/* --- STORE SPECIFIC CSS --- */
/* Extends variables from styles.css */

.store-hero {
    background: #0a0a0a;
    padding: 6rem 2rem 4rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.store-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(223, 176, 89, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.store-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.store-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-gold);
}

.store-hero p {
    color: #ccc;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- STORE LAYOUT --- */
.store-container {
    max-width: 1300px;
    margin: 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* --- SIDEBAR FILTERS --- */
.store-sidebar {
    position: sticky;
    top: 150px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    color: var(--color-bg-dark);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text-light);
    transition: color var(--transition-fast);
}

.filter-label:hover {
    color: var(--color-gold);
}

.filter-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.filter-checkbox:checked {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
}

.filter-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: #000;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

/* --- PRODUCT GRID --- */
.store-main {
    display: flex;
    flex-direction: column;
}

.store-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.store-header-bar select {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    outline: none;
    font-family: inherit;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-smooth);
    border: 1px solid #f0f0f0;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-gold);
}

.product-image-wrap {
    position: relative;
    padding-top: 130%; /* Aspect ratio for books */
    background: #f9f9f9;
    overflow: hidden;
}

.product-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-gold);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    z-index: 2;
    text-transform: uppercase;
}

.product-actions-overlay {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    transition: bottom var(--transition-smooth);
    z-index: 2;
}

.product-card:hover .product-actions-overlay {
    bottom: 0;
}

.action-btn {
    background: none;
    border: none;
    color: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.action-btn:hover {
    color: var(--color-gold);
}

.action-btn i {
    width: 20px;
    height: 20px;
}

.product-details {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-bg-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-author {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.product-rating i {
    width: 14px;
    height: 14px;
    fill: var(--color-gold);
    color: var(--color-gold);
}

.rating-count {
    font-size: 0.85rem;
    color: #888;
    margin-left: 0.3rem;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-bg-dark);
}

.product-price-old {
    font-size: 0.95rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

/* --- SINGLE PRODUCT DETAIL PAGE --- */
.breadcrumb {
    padding: 2rem 2rem 1rem;
    max-width: 1300px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.breadcrumb a {
    color: var(--color-bg-dark);
    font-weight: 600;
}

.breadcrumb a:hover {
    color: var(--color-gold);
}

.product-detail-container {
    max-width: 1300px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}

.product-gallery {
    position: sticky;
    top: 150px;
}

.main-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
}

.thumbnail-grid {
    display: flex;
    gap: 1rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    border: 1px solid #eee;
    cursor: pointer;
    object-fit: cover;
    transition: border-color var(--transition-fast);
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--color-gold);
    border-width: 2px;
}

.product-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-bg-dark);
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-bg-dark);
    margin-bottom: 1.5rem;
}

.product-price-large span {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
    margin-left: 1rem;
}

.product-short-desc {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.feature-list {
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    color: var(--color-text);
}

.feature-list i {
    color: var(--color-gold);
    width: 18px;
    height: 18px;
}

.purchase-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    padding: 0.8rem 1.2rem;
    background: #f9f9f9;
    font-size: 1.2rem;
    color: var(--color-bg-dark);
}

.qty-btn:hover { background: #eee; }

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    font-weight: 700;
    font-size: 1rem;
    height: 100%;
}

.digital-delivery-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f4f1ea;
    border-radius: 4px;
    border-left: 4px solid var(--color-gold);
    margin-bottom: 2rem;
}

.digital-delivery-notice i { color: var(--color-gold-dark); }

/* --- PRODUCT TABS --- */
.product-tabs-section {
    max-width: 1300px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
}

.tabs-header {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-light);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
}

.tab-btn:hover { color: var(--color-bg-dark); }

.tab-btn.active {
    color: var(--color-bg-dark);
    border-bottom-color: var(--color-gold);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tab-content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* --- RESPONSIVE STORE --- */
@media (max-width: 992px) {
    .store-container { grid-template-columns: 1fr; }
    .store-sidebar { display: none; /* In a real app, this would be a toggle drawer */ }
    .product-detail-container { grid-template-columns: 1fr; gap: 2rem; }
    .product-gallery { position: relative; top: 0; }
}

@media (max-width: 768px) {
    .store-hero h1 { font-size: 2.2rem; }
    .purchase-actions { flex-direction: column; }
    .tabs-header { overflow-x: auto; white-space: nowrap; }
}

/* --- MODAL STYLES (Checkout) --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: var(--gold);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #000;
}

.close-modal {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(223, 193, 123, 0.2);
}
