/*
Theme Name: Professional Bookshop
Theme URI: https://example.com/professional-bookshop
Author: Antigravity Protocol
Description: A clean, sleek, and modern WordPress theme for a modern online book merchant. Same core structure as before, but with its own distinct brand identity.
Version: 1.2.0
Requires PHP: 7.4
Text Domain: professional-bookshop
*/

:root {
	--bg-primary: #f5f5f5;
	--bg-surface: #ffffff;
	--bg-header: #ffffff;
	
	--text-primary: #333333;
	--text-secondary: #555555;
	--text-light: #777777;
	
	--accent-color: #0056b3; /* Standard blue */
	--accent-hover: #004494;
	--border-color: #cccccc;
	--border-light: #e9ecef;
	
	--font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--transition: all 0.1s;
	--radius: 4px;
	--shadow-sm: none;
	--shadow-md: none;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	font-family: var(--font-main);
	color: var(--text-primary);
	background-color: var(--bg-primary);
	line-height: 1.5;
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--text-primary);
	text-decoration: none;
	transition: var(--transition);
}

a:hover { color: var(--accent-color); }

img { max-width: 100%; height: auto; display: block; border-radius: 4px; }

h1, h2, h3, h4, h5, h6 {
	color: var(--text-primary);
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: bold;
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

/* HEADER */
.site-header {
	background: var(--bg-header);
	border-bottom: 1px solid var(--border-color);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-top { display: flex; align-items: center; padding: 16px 0; gap: 32px; }
.site-branding { flex-shrink: 0; }
.site-title { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: -0.5px; }
.site-title span { color: var(--accent-color); }

.header-search { flex-grow: 1; max-width: 600px; }
.header-search form {
	display: flex; position: relative; background: var(--bg-surface);
	border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-color);
	transition: var(--transition);
}
.header-search form:focus-within { background: var(--bg-surface); border-color: var(--accent-color); }

.header-search input[type="search"] {
	width: 100%; padding: 12px 20px; border: none; outline: none; font-size: 14px; background: transparent;
}
.header-search button { background: var(--accent-color); color: white; border: none; padding: 0 24px; cursor: pointer; font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.header-actions a { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.header-actions a:hover { color: var(--accent-color); }

.cart-icon, .user-icon { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.cart-link { position: relative; }
.cart-count {
	position: absolute; top: -6px; left: 10px; background: var(--accent-color); color: white;
	font-size: 11px; font-weight: bold; padding: 1px 5px; border-radius: 3px;
}

.main-navigation { border-top: 1px solid var(--border-color); }
.nav-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 32px; }
.nav-menu li a { display: block; padding: 16px 0; font-weight: 600; font-size: 14px; color: var(--text-secondary); border-bottom: 2px solid transparent; }
.nav-menu li a:hover { color: var(--accent-color); border-bottom-color: var(--accent-color); }

/* PAGE LAYOUT */
.content-area-wrapper { display: flex; padding: 40px 0; gap: 48px; }

/* SIDEBAR */
.site-sidebar { width: 260px; flex-shrink: 0; }
.widget { margin-bottom: 32px; background: var(--bg-surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border-color); }
.widget-title { font-size: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

.custom-checkbox { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 14px; cursor: pointer; }
.custom-checkbox input { accent-color: var(--accent-color); width: 16px; height: 16px; margin: 0; }
.custom-checkbox:hover { color: var(--text-primary); }
.widget ul li .count { background: var(--border-light); color: var(--text-secondary); font-size: 12px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }

/* MAIN CONTENT */
.site-main { flex-grow: 1; min-width: 0; }
.page-header { margin-bottom: 32px; }
.page-title { font-size: 32px; margin-bottom: 16px; }
.page-description { color: var(--text-secondary); font-size: 15px; max-width: 800px; line-height: 1.6; }

.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.section-heading h2 { font-size: 22px; margin: 0; }
.section-heading .subtitle { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.pagination { font-weight: 600; color: var(--text-secondary); font-size: 14px; }

/* PRODUCT GRID */
.products-wrapper { margin-bottom: 56px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.product-card {
	background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius);
	padding: 16px; display: flex; flex-direction: column; transition: var(--transition);
}
.product-card:hover { background: #f8f9fa; border-color: var(--accent-color); }

.product-image { height: 240px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; background: var(--border-light); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border-color); }
.product-image img { max-height: 100%; object-fit: contain; border: 1px solid #ddd; }

.product-info-wrap { display: flex; flex-direction: column; flex-grow: 1; }
.product-title { font-size: 16px; line-height: 1.4; margin-bottom: 8px; }
.product-author { color: var(--text-secondary); font-size: 13px; margin-bottom: 12px; }

.product-format { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-light); margin-bottom: 16px; }
.format-tag { background: #eee; color: #333; padding: 2px 6px; border-radius: 2px; font-weight: normal; border: 1px solid #ccc; }
.format-tag.video { background: #f5f5f5; color: #333; }

.product-meta { margin-top: auto; }
.product-price { font-weight: 700; font-size: 18px; color: var(--text-primary); margin-bottom: 12px; }
.product-price .old-price { color: var(--text-light); text-decoration: line-through; font-size: 14px; font-weight: 500; margin-right: 8px; }

.btn-add-to-cart {
	display: block; width: 100%; text-align: center; background: #e9ecef; color: #333;
	border: 1px solid #ccc; padding: 8px 0; border-radius: var(--radius); font-size: 14px;
	cursor: pointer; transition: var(--transition);
}
.btn-add-to-cart:hover { background: #d8dcd1; color: #000; border-color: #bbb; }

/* BANNER */
.promo-banner {
	background: var(--accent-color); padding: 24px; text-align: center;
	font-weight: bold; font-size: 18px; color: white; margin-top: 48px; border-radius: var(--radius); border: 1px solid var(--accent-hover);
}

/* FOOTER */
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border-color); padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-col h3 { font-size: 16px; margin-bottom: 24px; color: var(--text-primary); }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 12px; }
.footer-menu a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.footer-menu a:hover { color: var(--accent-color); }
.site-info { border-top: 1px solid var(--border-color); padding-top: 24px; text-align: center; color: var(--text-secondary); font-size: 13px; }

/* RESPONSIVE */
@media (max-width: 992px) {
	.content-area-wrapper { flex-direction: column; }
	.site-sidebar { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
	.widget { margin-bottom: 0; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
	.header-top { flex-wrap: wrap; }
	.header-search { order: 3; width: 100%; max-width: 100%; }
	.nav-menu { flex-wrap: wrap; gap: 16px; }
	.product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
