/* General page */
html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    background-color: #F7F3E9;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;

    /* Image and repeating */
    background-image: url("background.png");
    background-size: 150px auto;
    background-repeat: repeat;
    background-position: top left;

    /* Transparency */
    opacity: 0.3;
}


main {
    min-height: 600px;
}


/* Intro / splash page (1s fade-in on load, not scrollable) - intro.html */
.intro-page {
    overflow: hidden;
    height: 100vh;
}

.intro-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 20, 60, 0);
    animation: introBgFadeIn 1s ease forwards;
}

@keyframes introBgFadeIn {
    from {
        background-color: rgba(10, 20, 60, 0);
    }
    to {
        background-color: rgba(10, 20, 60, 0.9);
    }
}

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

.intro {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    opacity: 0;
    animation: introContentFadeIn 1s ease forwards;
}

.intro h2 {
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
    font-size: 28px;
    margin-bottom: 16px;
    color: white;
}

.intro p {
    font-size: 15px;
    color: #e8e8f0;
    line-height: 1.6;
}

.intro-tag {
    text-align: center;
    margin-top: 20px;
    color: #b8bfe0;
    font-size: 13px;
}

.intro-enter-link {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 28px;
    border: 1px solid white;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.intro-enter-link:hover {
    background: white;
    color: #0a143c;
}


/* Header */
header {
    border-bottom: 1px solid #ddd;
}

.header-top {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    box-sizing: border-box;
}


/* Logo - left side */
.logo {
    text-decoration: none;
    color: black;
    font-size: 28px;
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
    font-weight: 800;
}


/* Search - centered in top row */
.search-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.nav-search {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.nav-search:focus {
    border-color: #999;
}

.search-suggestions {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 340px;
    overflow-y: auto;
    z-index: 20;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: black;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-image {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    flex-shrink: 0;
}

.suggestion-text {
    display: flex;
    flex-direction: column;
}

.suggestion-name {
    margin: 0;
    font-size: 13px;
}

.suggestion-price {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.suggestion-empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #666;
}


/* Category nav row */
.header-nav {
    padding: 14px 20px;
    background: #f5f5f5;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-list a {
    text-decoration: none;
    color: #222;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-list a:hover {
    text-decoration: underline;
}

.nav-list a.sale {
    color: #d63864;
}


/* 404 page */
.not-found {
    text-align: center;
    padding: 100px 20px;
}

.not-found-code {
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
    font-weight: 800;
    font-size: 80px;
    color: #ccc;
    margin: 0;
}

.not-found h2 {
    margin: 10px 0;
}

.not-found p {
    color: #666;
}

.not-found-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: black;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.not-found-link:hover {
    background: #333;
}


/* Category grid - home page */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 160px);
    justify-content: center;
    gap: 120px;
    padding: 20px;
}

.category-card {
    text-decoration: none;
    color: black;
    display: block;
}

.category-image {
    aspect-ratio: 1 / 1;
    background: #e0e0e0;
    border-radius: 16px;
}

.category-name {
    text-align: center;
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Featured products - bottom of home page */
.featured-products {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 0 20px 40px;
}

.featured-heading {
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
    text-align: center;
    margin-bottom: 20px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
}


/* Footer */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #1a1a1a;
    margin-top: 40px;
}

footer p {
    margin: 0;
    font-size: 13px;
    color: #fff;
}

.footer-right p {
    cursor: pointer;
}

.footer-right p:hover {
    text-decoration: underline;
}


/* Product page */
.product-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 24px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 6px;
}

.product-top {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.product-gallery {
    flex: 1;
    min-width: 300px;
}

.gallery-main-wrap {
    position: relative;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #e0e0e0;
    border-radius: 16px;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

.gallery-arrow:hover {
    background: #f0f0f0;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.thumb {
    width: 60px;
    height: 60px;
    background: #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumb-active {
    border-color: black;
}

.product-info {
    flex: 1;
    min-width: 300px;
}

.product-title {
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
    font-size: 30px;
    margin: 0 0 10px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: #f5b800;
    letter-spacing: 2px;
}

.review-count {
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

.product-highlights {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
}

.product-highlights li {
    margin-bottom: 8px;
}

.product-highlights li:last-child {
    margin-bottom: 0;
}

.select-label {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

.option-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.option-btn {
    padding: 10px 18px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.option-btn:hover {
    border-color: black;
}

.option-active {
    border-color: black;
    background: black;
    color: white;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 20px 0;
}

.price-current {
    font-size: 26px;
    font-weight: 700;
}

.price-was {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

/* Product accordion */
.product-accordion {
    margin-top: 50px;
    border-top: 1px solid #ddd;
}

.accordion-item {
    border-bottom: 1px solid #ddd;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
    font-weight: 800;
    color: #1a1a1a;
    cursor: pointer;
}

.accordion-icon {
    font-size: 18px;
    font-weight: 400;
}

.accordion-body {
    display: none;
    padding: 0 0 20px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.accordion-open .accordion-body {
    display: block;
}

.accordion-body ul {
    margin: 0;
    padding-left: 20px;
}

.accordion-body li {
    margin-bottom: 8px;
}


/* Search / listing page */
.search-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.search-page h2 {
    font-family: 'Poppins', Montserrat, Arial, sans-serif;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.result-card {
    text-decoration: none;
    color: black;
    display: block;
}

.result-image {
    aspect-ratio: 1 / 1;
    background: #e0e0e0;
}

.result-name {
    margin: 10px 0 2px;
    font-size: 14px;
    font-weight: 600;
}

.result-price {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.search-empty {
    color: #666;
    padding: 40px 0;
}


/* Listing bar - filter/sort/count */
.listing-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    position: relative;
}

.filter-btn,
.sort-btn {
    background: white;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #222;
}

.chevron {
    font-size: 11px;
    margin-left: 4px;
}

.product-count {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.filter-wrapper,
.sort-wrapper {
    position: relative;
}

.filter-panel,
.sort-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.sort-dropdown {
    left: auto;
    right: 0;
    min-width: 180px;
    overflow: hidden;
}

.filter-panel {
    min-width: 220px;
    padding: 16px;
}

.dropdown-open {
    display: block;
}

.filter-section {
    margin-bottom: 16px;
}

.filter-section-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    cursor: pointer;
}

.filter-clear {
    width: 100%;
    padding: 8px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.filter-clear:hover {
    border-color: black;
}

.sort-option {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
}

.sort-option:hover {
    background: #f5f5f5;
}