/* Universal Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #F5F5F5;
}

/* Header Container */
header {
    width: 100%;
    background-color: #ffffff;
}

/* Upper White Header Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: #ffffff;
}

.top-bar img {
    height: 200px;
    width: auto;
    object-fit: contain;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 10px 22px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #333333;
}

/* Lower Dark Navigation Bar */
.main-nav {
    background-color: #000000;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    width: 100%;
}

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

/* Force all links inside nav bar to be white */
.main-nav a, 
.main-nav a:visited, 
.main-nav a:link {
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-block;
}

.nav-link-main {
    font-size: 18px;
    font-weight: 700;
}

.nav-link-sub {
    font-size: 13px;
    font-weight: 500;
    color: #d1d1d1 !important;
}

.nav-dot {
    color: #a6a6a6;
    font-size: 14px;
}

.nav-arrow {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.main-nav a:hover {
    opacity: 0.75;
}

/* Shopping Cart Icon */
.cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cart-icon img {
    width: 26px;
    height: 26px;
    display: block;
    filter: invert(1);
}

/* Enhanced, Full-Width Immersive Hero Section */
.hero {
    position: relative;
    width: 100%;
    min-height: 560px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.4)), 
                url('../Images/Hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    box-shadow: inset 0 -20px 40px rgba(0, 0, 0, 0.3);
}

.hero-content {
    max-width: 850px;
    color: #ffffff;
    animation: heroFadeIn 0.8s ease-out;
}

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

.hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 18px;
    color: #e5e5e5;
    margin-bottom: 36px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-hero-primary {
    background-color: #ffffff;
    color: #000000;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-hero-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ==========================================================================
   Category Badge & Grid Layout (Figma Frames 2 & 3)
   ========================================================================== */
.main-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 40px 50px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #111111;
}

.category-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #000000;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 30px;
}

#items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.favorite-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 2;
    cursor: pointer;
}

.card-img-wrapper {
    width: 100%;
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    text-align: center;
    margin-bottom: 12px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #111111;
}

/* ==========================================================================
   Product Detail Page Layout (Figma Frame 4 / purchase.php)
   ========================================================================== */
.product-detail-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 50px;
    display: grid;
    grid-template-columns: 420px 1fr 280px;
    gap: 40px;
    align-items: start;
}

.product-detail-img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

.product-rating {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 16px;
}

.product-meta {
    font-size: 12px;
    color: #666666;
    margin-bottom: 16px;
    line-height: 1.6;
}

.product-description-text {
    font-size: 13px;
    color: #333333;
    line-height: 1.6;
}

/* Right-side Purchase Box */
.purchase-sidebar {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.btn-add-cart,
.btn-buy-now {
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-add-cart:hover,
.btn-buy-now:hover {
    background-color: #222222;
}

.purchase-divider {
    font-size: 11px;
    font-weight: 700;
    color: #777777;
    margin: 4px 0;
}

/* ==========================================================================
   Top Deals Section (Figma Frame 2)
   ========================================================================== */
.top-deals-container {
    max-width: 1350px;
    margin: 40px auto;
    padding: 0 50px;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.deal-card {
    text-decoration: none;
    color: #000000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease;
}

.deal-card:hover {
    transform: translateY(-4px);
}

.deal-img-wrapper {
    width: 100%;
    height: 380px;
    border-radius: 28px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.deal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-caption {
    font-size: 13px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    padding-left: 4px;
}

/* Category Filter Dropdown Pill */
.category-select-wrapper {
    margin-bottom: 30px;
}

.category-dropdown {
    appearance: none;
    background-color: #000000;
    color: #ffffff;
    padding: 10px 40px 10px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

/* Product Cards & Favorite Star */
.fav-star-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 1px solid #e2e2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    color: #999999;
    transition: all 0.2s ease;
}

.fav-star-btn.active {
    color: #ffcc00;
    background: #ffffff;
    border-color: #ffcc00;
}

/* Live Moving Category Marquee on Navbar */
.nav-marquee-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 40px;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.nav-marquee-track {
    display: inline-flex;
    gap: 50px;
    animation: navMarqueeSlide 25s linear infinite;
}

.nav-marquee-container:hover .nav-marquee-track {
    animation-play-state: paused;
}

@keyframes navMarqueeSlide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.nav-marquee-item {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.nav-marquee-item:hover {
    color: #b3b3b3 !important;
    transform: scale(1.08);
}

/* Responsive Breakpoints for Smaller Screens & Reduced Tabs */
@media (max-width: 1024px) {
    .top-bar, .main-nav, .main-container, .product-detail-container, .top-deals-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .top-bar img {
        height: 120px;
    }

    .main-nav {
        padding: 0 15px;
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-marquee-container {
        display: none;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    #items {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}


/* Quantity Selector & Purchase Forms */

   .quantity-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e2e2;
    margin-bottom: 10px;
}

.qty-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    outline: none;
    transition: border-color 0.2s ease;
}

.qty-input:focus {
    border-color: #000000;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* Removes default spin buttons in WebKit browsers for a cleaner look, 
   though they will still function on hover/focus */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    opacity: 1;
}