/*
Theme Name: Kitabzo
Theme URI:
Author: Kitabzo
Author URI: https://daralghuraba.com/
Description: Kitabzo — a WordPress theme for an authentic Islamic shop (books, caps, dates, prayer mats, counters) with WhatsApp ordering (no cart/checkout). Emerald & gold Islamic aesthetic, bilingual (English / Arabic RTL), dark-mode ready. Includes a "Product" custom post type with category, brand and origin taxonomies.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kitabzo
Tags: custom-post-type, rtl-language-support, translation-ready, full-width-template, custom-menu, featured-images
*/

/*
 * The complete design system lives in assets/css/styles.css and is
 * enqueued from functions.php. This file exists so WordPress can detect
 * the theme and read its metadata above. Theme-level overrides go below.
 */

/* ── Single book: WooCommerce-style layout ─────────────────── */
.product-single-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
}

/* Gallery: main viewer */
.product-media-main {
	position: relative;
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--card-radius);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-sm);
}
.product-media-current {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	cursor: zoom-in;
	transition: transform var(--transition-slow);
}
.product-media-main:hover .product-media-current {
	transform: scale(1.12);
}
.product-media-main .product-cover-art {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px;
	text-align: center;
	color: #fff;
}
.product-media-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--border-subtle);
	background: var(--bg-glass-strong);
	backdrop-filter: blur(8px);
	color: var(--text-primary);
	font-size: 1.2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	transition: all var(--transition-fast);
}
.product-media-arrow:hover { background: var(--accent-emerald); color: #fff; border-color: var(--accent-emerald); }
.product-media-prev { left: 14px; }
.product-media-next { right: 14px; }
.product-media-main .product-card-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
}
.product-media-zoom {
	position: absolute;
	bottom: 12px;
	right: 12px;
	z-index: 3;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: var(--bg-glass-strong);
	border: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-secondary);
	font-size: 1rem;
	pointer-events: none;
}

/* Dots */
.product-media-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 16px 0;
}
.product-media-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: var(--border-accent);
	cursor: pointer;
	transition: all var(--transition-fast);
}
.product-media-dot.active { background: var(--accent-emerald); transform: scale(1.3); }

/* Thumbnail strip */
.product-media-thumbs {
	display: flex;
	align-items: center;
	gap: 8px;
}
.product-thumbs-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 4px;
}
.product-thumbs-track::-webkit-scrollbar { display: none; }
.product-thumb {
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	padding: 0;
	border: 2px solid var(--border-subtle);
	border-radius: 12px;
	overflow: hidden;
	background: var(--bg-secondary);
	cursor: pointer;
	transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb:hover { transform: translateY(-2px); }
.product-thumb.active { border-color: var(--accent-emerald); }
.product-thumbs-arrow {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--border-subtle);
	background: var(--bg-secondary);
	color: var(--text-primary);
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
	transition: all var(--transition-fast);
}
.product-thumbs-arrow:hover { background: var(--accent-emerald); color: #fff; border-color: var(--accent-emerald); }

/* Info column */
.product-info-price {
	font-family: var(--font-body);
	font-size: 2rem;
	font-weight: 700;
	color: var(--accent-emerald);
	margin: 12px 0 20px;
}
.product-info-price .currency { font-size: 1.1rem; margin-right: 4px; }
.product-info-actions { margin-top: 28px; }
.product-info-actions .btn { width: 100%; justify-content: center; }

@media (max-width: 860px) {
	.product-single-grid { grid-template-columns: 1fr; gap: 32px; }
	.product-info-actions .btn { width: auto; }
}

/* Contact page touches */
.contact-card-icon svg { color: var(--accent-emerald); }
.contact-card { align-items: center; }
@media (max-width: 860px) {
	.contact-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Gallery lightbox */
.dag-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 14, 10, 0.92);
	backdrop-filter: blur(6px);
	padding: 24px;
}
.dag-lightbox.active {
	display: flex;
	animation: dagLbFade 0.2s ease-out;
}
@keyframes dagLbFade { from { opacity: 0; } to { opacity: 1; } }
.dag-lb-stage {
	margin: 0;
	max-width: 90vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.dag-lb-img {
	max-width: 90vw;
	max-height: 80vh;
	border-radius: 12px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
	object-fit: contain;
}
.dag-lb-count {
	color: rgba(255, 255, 255, 0.75);
	font-family: var(--font-body);
	font-size: 0.9rem;
	letter-spacing: 0.02em;
}
.dag-lb-close,
.dag-lb-nav {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--transition-fast), transform var(--transition-fast);
}
.dag-lb-close:hover,
.dag-lb-nav:hover { background: var(--accent-emerald); transform: scale(1.05); }
.dag-lb-close {
	top: 20px;
	right: 24px;
	width: 44px;
	height: 44px;
	font-size: 1.6rem;
	line-height: 1;
}
.dag-lb-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 2rem;
	line-height: 1;
}
.dag-lb-nav:hover { transform: translateY(-50%) scale(1.05); }
.dag-lb-prev { left: 24px; }
.dag-lb-next { right: 24px; }
@media (max-width: 600px) {
	.dag-lb-nav { width: 42px; height: 42px; font-size: 1.5rem; }
	.dag-lb-prev { left: 10px; }
	.dag-lb-next { right: 10px; }
	.dag-lb-close { top: 12px; right: 12px; }
}
