/* 
   Safa Organic - Premium E-commerce Styling
   Color Palette:
   Deep Forest Green: #1B4332
   Metallic Gold: #D4AF37
   Bone White: #FAF9F6
   Luxury Black: #1D1D1D
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --primary: #1B4332;
    --accent: #D4AF37;
    --bg-light: #FAF9F6;
    --text-dark: #1D1D1D;
    --text-muted: #6C757D;
    --white: #FFFFFF;
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
}

/* Premium Link Hover Effect for standard text links inside paragraphs/content */
p a:hover,
span a:hover,
.text-link:hover {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #102a1f 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(27, 67, 50, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #bfa02c 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.25);
    transform: translateY(-2px);
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(27, 67, 50, 0.05);
}

header.scrolled .logo-img {
    height: 50px;
}

header.scrolled .nav-item {
    color: var(--primary);
}

header.scrolled .action-icon {
    color: var(--primary);
}

header.scrolled .profile-pill {
    background: #f8f9fa;
    border: 1px solid #eee;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navigation Styles */
.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-item {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    padding: 10px 0;
}

header.scrolled .nav-item {
    color: var(--text-dark);
}

header.scrolled .nav-item:hover {
    color: var(--accent);
}

/* Mega Menu Base */
.nav-item.has-mega {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 999;
    padding: 50px 0;
    border-top: 1px solid #f0f0f0;
}

.nav-item.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.mega-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1.5fr;
    gap: 60px;
}

.mega-col h4 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.mega-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.mega-col ul li {
    margin-bottom: 15px;
}

.mega-col ul li a {
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mega-col ul li a i {
    font-size: 16px;
    color: var(--accent);
    opacity: 0.7;
}

.mega-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Mega Image / Promo */
.mega-image .promo-box {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 100%;
}

.promo-box img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: 0.5s;
}

.promo-box:hover img {
    transform: scale(1.05);
}

.promo-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.promo-content span {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 5px;
}

.promo-content h5 {
    font-size: 20px;
    color: white;
    margin-bottom: 10px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-icon {
    font-size: 20px;
    color: var(--white);
    cursor: pointer;
    transition: 0.3s;
}

header.scrolled .action-icon {
    color: var(--text-dark);
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Pill Section */
.user-area {
    position: relative;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 15px 6px 6px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    color: var(--white);
}

header.scrolled .profile-pill {
    color: var(--primary);
}

.profile-pill:hover {
    background: rgba(255, 255, 255, 0.2);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    /* Clips the image to circle */
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.profile-pill i {
    font-size: 10px;
    opacity: 0.7;
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
    z-index: 1001;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.profile-dropdown a i {
    font-size: 16px;
    width: 20px;
    color: var(--primary);
    opacity: 0.8;
}

.profile-dropdown a:hover {
    background: #f9f9f9;
    color: var(--primary);
}

.profile-dropdown .divider {
    height: 1px;
    background: #eee;
    margin: 10px 0;
}

.logout-link {
    color: #e63946 !important;
}

/* Login Pill */
.login-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: white !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.login-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* --- HERO SLIDER REDESIGN --- */
.hero-slider {
    width: 100%;
    height: 100vh;
    min-height: 800px;
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    position: relative;
    overflow: hidden;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.85) 0%, rgba(27, 67, 50, 0.4) 100%);
    z-index: 2;
}

.slider-content-wrap {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero .subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transform: translateY(30px);
    opacity: 0;
    transition: 0.8s 0.2s;
}

.hero h2 {
    font-size: 72px;
    line-height: 1.1;
    color: white;
    margin-bottom: 25px;
    font-family: 'Playfair Display', serif;
    transform: translateY(40px);
    opacity: 0;
    transition: 0.8s 0.4s;
}

.hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 45px;
    max-width: 600px;
    transform: translateY(50px);
    opacity: 0;
    transition: 0.8s 0.6s;
}

.hero-btns {
    display: flex;
    gap: 20px;
    align-items: center;
    transform: translateY(60px);
    opacity: 0;
    transition: 0.8s 0.8s;
}

/* Active Slide Animations */
.swiper-slide-active .subtitle,
.swiper-slide-active h2,
.swiper-slide-active p,
.swiper-slide-active .hero-btns {
    transform: translateY(0);
    opacity: 1;
}

/* Swiper Custom Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.5;
    transition: 0.3s;
}

.swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 10px;
    background: var(--accent);
    opacity: 1;
}

.hero-badge {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: floating 6s ease-in-out infinite;
    z-index: 4;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(-50%) translateX(0);
    }

    50% {
        transform: translateY(-55%) translateX(10px);
    }
}

.hero-badge h3 {
    font-size: 42px;
    color: var(--accent);
    margin-bottom: 5px;
}

.hero-badge span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
}

/* --- PRODUCT CARD --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: var(--transition);
    position: relative;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.product-img {
    height: 300px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-img .secondary-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-card:hover .product-img .secondary-img {
    opacity: 1;
}

/* =============================================
   PREMIUM CORNER RIBBON BADGE
   Top-left diagonal ribbon like luxury tags
   ============================================= */

/* Wrapper sits over the product image */
.product-badge-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 110px;
    height: 110px;
    overflow: hidden;
    z-index: 20;
    pointer-events: none;
}

/* The ribbon itself — rotated diagonal */
.badge-discount {
    position: absolute;
    top: 22px;
    left: -30px;
    width: 140px;
    text-align: center;

    /* Luxury crimson gradient */
    background: linear-gradient(180deg, #ff1744 0%, #c62828 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 7px 0 6px 0;

    /* Diagonal rotation */
    transform: rotate(-45deg);
    transform-origin: center;

    /* Shadow to simulate depth */
    box-shadow:
        0 3px 10px rgba(198, 40, 40, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);

    /* Shimmer animation */
    overflow: hidden;
}

/* Shimmer sweep effect */
.badge-discount::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.45) 50%,
            transparent 100%);
    animation: ribbon-shimmer 2.8s ease-in-out infinite;
}

/* Bottom fold shadow of ribbon (left & right edge) */
.badge-discount::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10px;
    right: 10px;
    height: 5px;
    background: rgba(0, 0, 0, 0.18);
    filter: blur(2px);
    border-radius: 50%;
}

@keyframes ribbon-shimmer {
    0% {
        left: -75%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        left: 125%;
        opacity: 0;
    }
}

.product-info {
    text-align: left;
}

.product-cat {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-price {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 16px;
}

.add-to-cart-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    transform: translateY(100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 25;
}

.product-card:hover .add-to-cart-hover {
    transform: translateY(0);
    opacity: 1;
}

/* --- SIDE CART DRAWER --- */
.side-cart {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100vh;
    background-color: var(--white);
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.side-cart.open {
    right: 0;
}

.side-cart-header {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.side-cart-footer {
    padding: 30px;
    border-top: 1px solid #f0f0f0;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-details {
    flex: 1;
}

/* --- MOBILE FLOATING NAV --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: rgba(27, 67, 50, 0.85);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    z-index: 1500;
    padding: 12px 20px;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mobile-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mobile-nav a.active {
    color: var(--accent);
}

.mobile-nav span {
    font-size: 10px;
    text-transform: uppercase;
}

/* --- PROGRESS BAR (Free Delivery) --- */
.progress-container {
    margin: 15px 0;
}

.progress-text {
    font-size: 13px;
    margin-bottom: 8px;
    display: block;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent);
    transition: width 0.5s ease;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 991px) {
    .nav-links {
        display: none;
    }

    .hero-content h2 {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }

    header {
        padding: 15px 0;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .side-cart {
        width: 100%;
        right: -100%;
    }
}
/* Login Pill Premium Styles */
.login-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

header.scrolled .login-pill {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.2);
}

.login-pill i {
    font-size: 14px;
}

.login-pill:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.login-pill i, .login-pill span { color: inherit; }
header.scrolled .nav-item i { color: inherit; }

/* Desktop Wishlist Button */
.wishlist-btn-desktop, .quick-view-btn-desktop {
    position: absolute;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    opacity: 0;
    transform: translateX(20px);
}

.wishlist-btn-desktop { top: 15px; }
.quick-view-btn-desktop { top: 65px; transition-delay: 0.1s; }

.product-card:hover .wishlist-btn-desktop,
.product-card:hover .quick-view-btn-desktop {
    opacity: 1;
    transform: translateX(0);
}

.wishlist-btn-desktop:hover, .quick-view-btn-desktop:hover {
    background: var(--primary);
    color: white !important;
}

.wishlist-btn-desktop.active {
    color: #ef4444 !important;
    opacity: 1;
    transform: translateX(0);
}

.wishlist-btn-mobile, .quick-view-btn-mobile {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wishlist-btn-mobile { top: 10px; }
.quick-view-btn-mobile { top: 50px; }

.wishlist-btn-mobile.active { color: #ef4444 !important; }

/* Quick View Modal Premium Styles */
#quick-view-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#quick-view-modal.active {
    display: flex;
    opacity: 1;
}

.qv-container {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 30px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

#quick-view-modal.active .qv-container {
    transform: translateY(0) scale(1);
}

.qv-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: 0.3s;
    z-index: 100;
}

.qv-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

@media (max-width: 640px) {
    .qv-container {
        border-radius: 20px;
        max-height: 95vh;
    }
    .qv-modal-body {
        padding: 15px !important;
    }
}

/* === UNIVERSAL IMAGE SIZING RULE === */
.product-card img.card-img, 
.product-card-mobile img.card-img-mobile,
.mobile-main-img,
#main-product-img {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    object-fit: cover !important;
    object-position: center !important;
    height: auto;
}
