/* Base Reset & Light Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: 0.5px;
}

body {
    background-color: #ffffff;
    color: #111111;
}

/* Top Notification Bar */
.top-banner {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 0;
    text-transform: uppercase;
}

/* Header Styling */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 6px 40px;
    font-size: 0.7rem;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

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

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
}

.logo {
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 2px;
}

nav a {
    color: #111;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 15px;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: #666;
}

.header-right {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

.filter-group {
    display: flex;
    gap: 20px;
}

.filter-group span {
    cursor: pointer;
}

/* Products Section */
.products-container {
    padding: 30px 40px;
}

.caps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

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

.loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 40px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Culture Kings Style Product Card */
.cap-card {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.cap-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f4f4; /* Subtle gray background so white cap images pop */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

.cap-image-wrapper img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    mix-blend-mode: multiply; /* Perfect for blending white photo background smoothly */
    transition: transform 0.3s ease;
}

.cap-card:hover .cap-image-wrapper img {
    transform: scale(1.04);
}

.brand-title {
    font-size: 0.7rem;
    color: #777;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 700;
}

.cap-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    line-height: 1.2;
    margin-bottom: 6px;
}

.cap-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111;
}

/*Product html */

/* --- PRODUCT DETAIL PAGE (PDP) STYLES --- */

.pdp-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 40px;
    gap: 60px;
    align-items: flex-start;
}

/* Left Side: 2-Column Image Grid */
.pdp-images {
    flex: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pdp-image-box {
    background: #f4f4f4;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdp-image-box img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    mix-blend-mode: multiply; /* Blends white backgrounds cleanly */
    cursor: zoom-in; /* Signals the image is clickable to enlarge */
}

/* Mobile: stack layout, make images full-width and much bigger instead of a
   cramped 2x2 grid, and drop the sticky positioning (doesn't make sense once
   details are stacked below the images instead of beside them). */
@media (max-width: 768px) {
    .pdp-container {
        flex-direction: column;
        padding: 15px;
        gap: 25px;
    }

    .pdp-images {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pdp-image-box {
        aspect-ratio: 1 / 1;
    }

    .pdp-details {
        position: static;
        top: unset;
    }
}

/* Lightbox: full-screen enlarged image view on click */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 92%;
    max-height: 85%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 10px 16px;
    cursor: pointer;
}

.lightbox-prev { left: 15px; }
.lightbox-next { right: 15px; }

/* Right Side: Sticky Details */
.pdp-details {
    flex: 1;
    position: sticky;
    top: 100px; /* Sticks 100px from the top of the screen */
    display: flex;
    flex-direction: column;
}

.pdp-brand {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.pdp-title {
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
}

.pdp-price {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.pdp-colorway {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.add-to-bag-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-bottom: 15px;
}

.add-to-bag-btn:hover {
    background-color: #333;
}

/* --- ADMIN DRAG & DROP UPLOADER --- */
.upload-container {
    background: #f9f9f9;
    border: 2px dashed #ccc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.upload-container.drag-over {
    border-color: #000;
    background: #f0f0f0;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-item:active {
    cursor: grabbing;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents dragging the image file itself instead of the container */
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn-custom {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

/* 1. The Container */
.hero-banner-container {
    position: relative; /* Required so the button stays inside */
    width: 100%;
    height: 450px; /* You can adjust this number to make the banner taller or shorter */
    overflow: hidden; /* Prevents the image from spilling out */
    background-color: #000; /* Fallback background */
}

/* 2. The Image itself */
.hero-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This is the magic rule that removes the black bars! */
    object-position: center center; /* Keeps your DRIPFORMMNL logo perfectly in the middle */
    display: block;
}

/* 3. The Overlay Button */
.hero-overlay-text {
    position: absolute;
    bottom: 30px; /* Pushes the button toward the bottom of the image */
    left: 50%;
    transform: translateX(-50%); /* Centers the button perfectly */
    text-align: center;
    z-index: 10;
}   

.hero-btn {
    background: #fff;
    color: #000;
    padding: 10px 24px;
    font-weight: 800;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-btn:hover {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
}

/* --- PDP RELATED PRODUCTS / LATEST DROPS --- */
.related-products-container {
    max-width: 1600px;
    margin: 80px auto 40px auto;
    padding: 40px 40px 0 40px;
    border-top: 1px solid #e5e5e5;
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.related-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shop-all-link {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    text-decoration: underline;
    letter-spacing: 0.5px;
}

.shop-all-link:hover {
    color: #666;
}


/* --- SEARCH & FILTER BAR --- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-bottom: 1px solid #e5e5e5;
    background-color: #ffffff;
}

.search-container input {
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    font-size: 0.8rem;
    width: 280px;
    text-transform: uppercase;
    background-color: #f9f9f9;
    font-weight: 600;
    transition: border-color 0.2s;
}

.search-container input:focus {
    outline: none;
    border-color: #111;
    background-color: #fff;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-group select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    background-color: #f9f9f9;
    appearance: none; /* Removes the ugly default browser arrow */
    
    /* Adds a custom minimalist black arrow */
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 12 8" xmlns="http://www.w3.org/2000/svg"><path d="M1.41 0L6 4.58L10.59 0L12 1.41L6 7.41L0 1.41L1.41 0Z" fill="%23111"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: #111;
    background-color: #fff;
}

/* --- HEADER SETUP FOR MEGA MENU --- */
header {
    position: relative; /* Crucial: Allows the mega menu to span the full width of the header */
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
}

.nav-item-dropdown {
    position: static; 
    height: 100%;
    display: flex;
    align-items: center;
}

/* --- THE MEGA MENU PANEL --- */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    
    /* Hidden by default, smooth fade in */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

/* Trigger the menu on hover */
.nav-item-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    gap: 60px;
}

/* --- LEFT SIDE: TEXT LISTS --- */
.mega-brands-lists {
    display: flex;
    gap: 80px;
    flex: 1;
}

.brand-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.brand-column h4 {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.brand-column a {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.brand-column a:hover {
    color: #666;
    text-decoration: underline;
}

/* --- RIGHT SIDE: FEATURED IMAGES --- */
.mega-featured {
    display: flex;
    gap: 20px;
    flex: 1.5; /* Gives the images slightly more horizontal space */
}

.featured-card {
    position: relative;
    flex: 1;
    height: 280px;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.featured-card:hover img {
    transform: scale(1.08);
    opacity: 0.4; /* Darkens image more on hover so text pops */
}

.card-overlay {
    position: absolute;
    inset: 0; /* Stretches to edges */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none; /* Lets mouse clicks pass through to the card */
}

.card-overlay h3 {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    text-transform: uppercase;
}

.card-overlay button {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid #fff;
    padding: 10px 24px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.featured-card:hover .card-overlay button {
    background: #fff;
    color: #000;
}


/* --- IN-GRID FEATURED ARTIST TILE --- */
.artist-feature-tile {
    grid-column: span 2; 
    grid-row: span 2;    
    position: relative;
    background-color: #111; 
    overflow: hidden;
    cursor: pointer;
    
    /* Notice we removed display: flex and height: 100% here */
}

.artist-feature-tile img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    
    /* 1. Switches back to cover so it fills the entire box edge-to-edge */
    object-fit: cover; 
    
    /* 2. Anchors the image specifically to the top center so his face and hat stay fully visible */
    object-position: top center; 
    
    opacity: 1; 
    transition: transform 0.5s ease;
}

.artist-feature-tile:hover img {
    transform: scale(1.03); 
}

.artist-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    pointer-events: none; /* Allows clicks to pass through to the tile */
}

.artist-overlay h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ccc;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.artist-overlay h2 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.hero-image {
    width: 100%;
    height: 100%; /* Or set a fixed height like 400px if you prefer */
    object-fit: cover;
    object-position: center center; /* Ensures the DRIPFORM MNL logo stays exactly in the middle */
    display: block;
}