/* Header Styling */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 4%;
    background: #4b4046;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}


/* Logo Text */

.logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    border-radius: 50%;
    padding: 1px 0;
}


/* Nav Links */

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #f0e8e8;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #d6ae60;
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: #d6ae60;
}

.nav-links li a:hover::after {
    width: 100%;
}


/* Splash Screen animation (Panda)*/

#splash-screen {
    position: fixed;
    z-index: 9999;
    background: white;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}

#splash-screen.fade-out {
    opacity: 0;
}

.loader {
    display: flex;
    gap: 1rem;
}

.loader div {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: bounce 0.8s infinite ease-in-out alternate;
}

.loader div:nth-child(1) {
    background: #ff4d6d;
    animation-delay: 0s;
}

.loader div:nth-child(2) {
    background: #4d96ff;
    animation-delay: 0.2s;
}

.loader div:nth-child(3) {
    background: #49f7b3;
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        transform: translateY(-20px);
    }
}


/* Wig Card Container (Grid) */

.sale-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4rem;
    padding: 2rem 4%;
    background: linear-gradient(to right, #fdfcfa, #f3e8e8);
    margin-bottom: 80px;
}

.card-content {
    flex-grow: 1;
}

.card-bottom {
    margin-top: auto;
}

.add-to-cart-btn {
    background-color: #d6ae60;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

.sale-card.hidden-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.sale-card.show-scroll {
    opacity: 1;
    transform: translateY(0);
}

.sale-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.sale-hero h2 {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #b88b2d, #d6ae60);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    letter-spacing: 1px;
    animation: fadeInSlide 1.2s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 70px 10px rgba(242, 209, 209, 0.1);
}

@keyframes fadeInSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sale-hero p {
    text-align: center;
    font-size: 20px;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    margin-top: -9px;
}


/* Each Card */

.sale-card {
    width: 100%;
    /* max-width: 250px; */
    background: #fff;
    border: 1px solid #f0e6e6;
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    overflow: hidden;
    justify-content: space-between;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeUp 0.6s ease both;
    height: 100%;
}


/* Wig Image */

.sale-card img {
    width: 100%;
    height: 300px;
    /* object-fit: cover; */
    border-radius: 10px;
    margin-bottom: 1rem;
}


/* Title */

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1px;
    margin-bottom: 0.1rem;
    font-family: 'Calisto MT';
}


/* Description */

.sale-card p:not(.sale-price):not(.product-qty):not(.color-label):not(.sale-regular-price):not(.discount-badge) {
    font-size: 1.1rem;
    font-weight: 500;
    color: #444;
    margin-top: 1px;
    margin-bottom: 1px;
}

.sale-card p,
h3,
div {
    padding: 2px;
    font-family: 'Calisto MT';
}

.color-label {
    font-weight: 600;
    margin-top: 1px;
    margin-bottom: 1px;
    color: #333;
    font-size: 0.9rem;
    font-family: 'Calisto MT';
}


/* Price */

.sale-price {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin: 0 0;
    font-family: 'Calisto MT';
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    /* space between price and badge */
}

.sale-regular-price {
    text-decoration: line-through;
    font-size: 12px;
    font-weight: bold;
    color: #111;
    margin: 0;
    /* remove default p spacing */
}

.discount-badge {
    background-color: crimson;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    animation: popIn 3s
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Color Dot List */

.color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 0px;
    margin-top: 1px;
    padding-left: 0;
    list-style: none;
}

.color-list li {
    display: flex;
    align-items: center;
    font-size: 10px;
    color: #333;
    background-color: #f9f9f9;
    padding: 2px 6px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    border: 1px solid #ccc;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn:hover {
    background-color: #b88b2d;
}


/* Animation */

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Footer (updated to fix overlap issue) */

.footer {
    background: linear-gradient(to right, #fdfcfa, #f3e8e8);
    padding: 30px 20px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    color: #3f0d12;
    border-top: 1px solid #ccc;
    position: relative;
}

.footer p {
    margin: 10px 0;
    font-size: 1rem;
    font-weight: 500;
}

.footer .social-icons {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer .social-icons a {
    color: #3f0d12;
    font-size: 1.4rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer .social-icons a:hover {
    transform: scale(1.2);
    color: crimson;
}


/* 🔥 Image Modal Styling */

#image-modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#modal-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    object-fit: contain;
}

#modal-close-btn {
    padding: 10px 20px;
    background: white;
    color: black;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

#modal-close-btn:hover {
    background: #f2f2f2;
}

header.hide {
    display: none !important;
}

.bottom-nav {
    display: none;
}

.cart-icon-btn.in-cart {
    background-color: green;
}


/* Mobile view */

@media (max-width: 768px) {
    /* Bottom Navigation - Mobile Only */
    .bottom-nav {
        display: none;
    }
    .header {
        display: none;
    }
    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        width: 100%;
        background: black;
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        z-index: 1000;
        border-top: 1px solid #333;
    }
    .bottom-nav a {
        color: #eee;
        font-size: 13px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        transition: 0.3s ease;
    }
    /* Active Nav Styling */
    .bottom-nav a.active-nav {
        background-color: #fff;
        color: #000;
        padding: 6px 12px;
        border-radius: 20px;
        transform: translateY(-8px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
    body,
    html {
        font-family: 'Arial', sans-serif;
        height: 100%;
        margin: 0;
        padding: 0;
    }
    body {
        overflow-x: hidden;
        background: linear-gradient(to right, #fffaef, #dbd8d2);
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    /* Hide scrollbar visually */
     ::-webkit-scrollbar {
        display: none;
    }
    /* Hero Section */
    .sale-hero {
        background-color: #000;
        color: #fff;
        text-align: center;
        padding: 30px 10px;
        margin-top: 60px;
    }
    .sale-hero h2 {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 5px;
    }
    .sale-hero p {
        font-size: 13px;
        color: #ccc;
        margin: 0;
    }
    /* Splash screen */
    #splash-screen {
        position: fixed;
        z-index: 9999;
        background: white;
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.8s ease;
    }
    #splash-screen h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    #splash-screen p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    #splash-screen button {
        background: #fff;
        color: #111;
        padding: 10px 20px;
        border: none;
        font-weight: bold;
        border-radius: 5px;
        cursor: pointer;
    }
    .header {
        display: none;
    }
    /* Bottom Navigation */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        width: 100%;
        background: black;
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        z-index: 1000;
        border-top: 1px solid #333;
    }
    .bottom-nav a {
        color: #eee;
        font-size: 13px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        transition: 0.3s ease;
    }
    .bottom-nav a.active-nav {
        background-color: #fff;
        color: #000;
        padding: 6px 12px;
        border-radius: 20px;
        transform: translateY(-8px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
    .cart-count-badge {
        position: absolute;
        top: -5px;
        right: -10px;
        background: red;
        color: white;
        font-size: 11px;
        font-weight: bold;
        padding: 2px 6px;
        border-radius: 50%;
        z-index: 10;
        animation: bounceBadge 0.4s ease-in-out;
    }
    .cart-link {
        position: relative;
    }
    @keyframes bounceBadge {
        0% {
            transform: scale(1) translate(50%, -50%);
        }
        50% {
            transform: scale(1.3) translate(50%, -50%);
        }
        100% {
            transform: scale(1) translate(50%, -50%);
        }
    }
    /* Product Grid */
    .sale-products {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* 2 in a row */
        gap: 1.1rem;
        padding: 1rem;
        margin-left: -0.5rem;
    }
    .sale-product-card {
        background: #fff;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
        padding: 0.3rem;
        font-size: 0.65rem;
    }
    .sale-card img {
        width: 100%;
        /* height: 200px; */
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 0.5rem;
    }
    .sale-card {
        width: 85%;
        height: auto;
        margin-bottom: 5px;
        padding: 1.5rem;
    }
    .sale-product-card h3 {
        font-size: 0.8rem;
        margin: 0.3rem 0;
    }
    .sale-product-card p {
        font-size: 0.7rem;
        margin: 0.2rem 0;
    }
    .sale-product-card .order-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        background-color: green;
        color: white;
        border: none;
        border-radius: 5px;
        margin-top: 0.4rem;
    }
    .sale-product-card .discount-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        background-color: crimson;
        color: #fff;
        border-radius: 4px;
        position: absolute;
        top: 6px;
        right: 6px;
    }
    /* Color List */
    .color-label {
        font-size: 10px;
        font-weight: 500;
        color: #333;
        margin-top: 4px;
    }
    .color-list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin: 3px 0;
        padding: 0;
        list-style: none;
    }
    .color-list li {
        font-size: 9px;
        display: flex;
        align-items: center;
        gap: 4px;
        background: #f0f0f0;
        padding: 2px 5px;
        border-radius: 20px;
    }
    .color-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 1px solid #444;
    }
    /* Cart Button (icon style) */
    .card-bottom {
        display: flex;
        justify-content: center;
        margin-top: 6px;
    }
    .cart-icon-btn {
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 18px;
        color: #d6ae60;
        transition: 0.3s;
    }
    .cart-icon-btn.in-cart {
        background-color: rgb(16, 132, 16);
        color: #fffdfd;
    }
    /* Optional: Animation */
    .hidden-scroll {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .show-scroll {
        opacity: 1;
        transform: translateY(0);
    }
    /* Modal (Image Zoom) */
    #image-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100vw;
        background-color: rgba(0, 0, 0, 0.85);
        z-index: 999;
        justify-content: center;
        align-items: center;
    }
    .modal-content {
        position: relative;
        max-width: 90%;
        max-height: 90%;
    }
    #modal-img {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }
    #modal-close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: #fff;
        color: #000;
        border: none;
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 4px;
        cursor: pointer;
    }
    /* ✅ Toast Message */
    .toast-message {
        position: absolute;
        bottom: -25px;
        left: 0;
        right: 0;
        margin: auto;
        text-align: center;
        font-size: 11px;
        color: white;
        background: #222;
        padding: 4px 10px;
        border-radius: 20px;
        width: fit-content;
        animation: fadeToast 5s forwards;
        z-index: 999;
    }
    .toast-message {
        position: relative;
        bottom: -8px;
        margin-top: 5px;
        font-size: 11px;
        padding: 3px 10px;
    }
    @keyframes fadeToast {
        0% {
            opacity: 0;
            transform: translateY(10px);
        }
        10% {
            opacity: 1;
            transform: translateY(0);
        }
        90% {
            opacity: 1;
        }
        100% {
            opacity: 0;
            transform: translateY(10px);
        }
    }
    /* ✅ Flying Image */
    .fly-img {
        position: fixed;
        width: 60px;
        height: 60px;
        object-fit: cover;
        z-index: 1000;
        transition: all 1s ease-in-out;
        border-radius: 8px;
        pointer-events: none;
    }
    /* ✅ Cart Icon Pulse */
    .pulse {
        animation: pulseGlow 0.8s ease-in-out 1;
    }
    @keyframes pulseGlow {
        0% {
            box-shadow: 0 0 0px 0 rgba(0, 255, 0, 0.6);
        }
        50% {
            box-shadow: 0 0 15px 6px rgba(0, 255, 0, 0.6);
        }
        100% {
            box-shadow: 0 0 0px 0 rgba(0, 255, 0, 0.6);
        }
    }
}

@media (min-width: 768px) {
    .sale-products {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-img {
        height: 180px;
    }
}