:root {
    --primary: #7F77DD;
    --secondary: #1D9E75;
    --accent-pink: #D4537E;
    --accent-cyan: #00BCD4;
    --accent-gold: #B8860B;
    --cream: #F5F1E8;
    --dark-text: #2C2C2A;
}

* {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--cream);
    color: var(--dark-text);
    overflow-x: hidden;
}

/* ── Navbar ── */
.navbar {
    background-color: white;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 600;
    color: var(--dark-text) !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-pink);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.dropdown-menu {
    border: 2px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

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

.dropdown-item {
    color: var(--dark-text);
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--cream);
    color: var(--primary);
    padding-left: 2rem;
}

/* ── Hero ── */
.hero {
    min-height: 600px;
    background: linear-gradient(135deg, var(--cream) 0%, #FFF8F0 100%);
    border-bottom: 4px solid var(--accent-gold);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(127,119,221,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark-text);
    letter-spacing: -2px;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--accent-pink);
    font-weight: 600;
    margin-bottom: 30px;
}

.hero-cta {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(127,119,221,0.3);
    border: none;
    cursor: pointer;
}

.hero-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(127,119,221,0.4);
    color: white;
    text-decoration: none;
}

/* ── Hero image panel ── */
.hero-books {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.hero-books img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.hero-books img:hover {
    transform: translateY(-6px);
}

.hero-books img:first-child {
    margin-top: 30px;
}

/* ── Product Card ── */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(127,119,221,0.2);
}

.product-image {
    width: 100%;
    height: 380px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-cyan) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info {
    padding: 24px;
}

.product-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-text);
}

.product-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.product-btn:hover {
    background: transparent;
    color: var(--primary);
}

.product-btn-amazon {
    background: #FF9900;
    border-color: #FF9900;
    margin-left: 12px;
}

.product-btn-amazon:hover {
    background: transparent;
    color: #FF9900;
}

/* ── Section Titles ── */
.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--dark-text);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent-pink), var(--accent-cyan));
    border-radius: 3px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--accent-pink);
    font-weight: 600;
    margin-bottom: 40px;
    margin-top: 20px;
}

/* ── Sections ── */
.featured-section {
    padding: 80px 0;
    background: white;
    border-top: 4px solid var(--accent-cyan);
    border-bottom: 4px solid var(--accent-gold);
}

.featured-section .section-title::after {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
}

.books-section {
    padding: 80px 0;
}

.books-section .section-title::after {
    background: linear-gradient(90deg, var(--primary), var(--accent-pink));
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.gadgets-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(127,119,221,0.05) 0%, rgba(212,83,126,0.05) 100%);
    border-top: 4px solid var(--primary);
}

.gadgets-section .section-title::after {
    background: linear-gradient(90deg, var(--accent-pink), var(--primary));
}

/* ── About ── */
.about-section {
    padding: 80px 0;
    background: white;
    border-top: 4px solid var(--accent-cyan);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-text);
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    border: 4px solid var(--primary);
    box-shadow: 0 16px 48px rgba(127,119,221,0.2);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--accent-pink), var(--accent-cyan));
    border-radius: 50%;
    opacity: 0.6;
    z-index: -1;
}

/* ── Footer ── */
footer {
    background: var(--dark-text);
    color: white;
    padding: 60px 0 30px;
    border-top: 4px solid var(--primary);
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    font-size: 16px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--accent-pink);
    transform: translateY(-4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 30px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.footer-designed-by {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #777;
}

.footer-logo {
    height: 28px;
    width: auto;
    opacity: .75;
    transition: opacity .25s ease;
    vertical-align: middle;
}

/* ── Category Page ── */
.category-hero {
    background: linear-gradient(135deg, rgba(127,119,221,0.1) 0%, rgba(212,83,126,0.1) 100%);
    padding: 60px 0;
    border-bottom: 4px solid var(--primary);
    margin-bottom: 60px;
}

.category-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--dark-text);
}

.category-hero .icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

.filters-sidebar {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #eee;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-title i {
    color: var(--primary);
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.filter-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filter-item label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.filter-item input[type="checkbox"]:checked + label {
    color: var(--primary);
    font-weight: 600;
}

.price-range {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.price-range input {
    width: 60px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.products-header-text {
    font-size: 14px;
    color: #666;
}

.sort-dropdown {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.pagination-section {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ── Product Detail Page ── */
.product-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.gallery-item {
    width: 100%;
    height: 500px;
    background: var(--cream);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
}

.gallery-thumb {
    width: 100%;
    height: 80px;
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 40px;
}

.product-details-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-text);
}

.product-details-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 14px;
    color: #666;
}

.meta-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.product-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
}

.product-long-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.product-cta-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-buy {
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-buy:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(127,119,221,0.3);
    color: white;
}

.btn-buy-amazon {
    background: linear-gradient(135deg, #FF9900, #FF6D00);
}

.btn-buy-amazon:hover {
    box-shadow: 0 12px 32px rgba(255,153,0,0.3);
}

.btn-secondary {
    padding: 14px 40px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.spec-item {
    padding: 16px;
    background: var(--cream);
    border-radius: 8px;
}

.spec-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.spec-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text);
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list i {
    color: var(--primary);
    font-size: 18px;
}

.reviews-section {
    background: linear-gradient(135deg, rgba(127,119,221,0.05) 0%, rgba(212,83,126,0.05) 100%);
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
}

.review {
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
}

.review-rating {
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.review-author {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 14px;
}

.review-text {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

/* ── Subcategory bar (category + gadgets pages) ── */
.subcat-bar {
    background: white;
    border-bottom: 2px solid rgba(127,119,221,.15);
    padding: 20px 0;
    position: sticky;
    top: 66px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.subcat-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.subcat-pill {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all .25s ease;
    white-space: nowrap;
}

.subcat-pill:hover {
    background: var(--primary);
    color: white;
}

.subcat-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(127,119,221,.35);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }

    .section-title {
        font-size: 36px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .navbar-brand {
        font-size: 20px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-hero h1 {
        font-size: 32px;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 40px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-dropdown {
        width: 100%;
    }

    .product-details-section {
        padding: 24px;
    }

    .product-details-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 28px;
    }

    .product-cta-buttons {
        flex-direction: column;
    }

    .btn-buy,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .hero-books {
        grid-template-columns: 1fr;
    }

    .subcat-pills { gap: 8px; }
    .subcat-pill  { padding: 8px 16px; font-size: 13px; }
}
