@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;800;900&family=Tajawal:wght@400;500;700;800&display=swap');

/* ================================================
   JAMAL MARKET — Premium Glassmorphism UI
   ================================================ */

:root {
    /* Premium Color Palette (Light/Vibrant Mode) */
    --clr-bg: #f8fafc;
    --clr-surface: rgba(255, 255, 255, 0.75);
    --clr-surface-solid: #ffffff;
    --clr-primary: #4f46e5;      /* Indigo 600 */
    --clr-primary-hover: #4338ca; /* Indigo 700 */
    --clr-secondary: #06b6d4;    /* Cyan 500 */
    --clr-accent: #f43f5e;       /* Rose 500 */
    --clr-text-main: #0f172a;
    --clr-text-muted: #475569;
    --clr-border: rgba(255, 255, 255, 0.5);
    --clr-border-solid: #e2e8f0;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    --gradient-text: linear-gradient(135deg, #4f46e5 0%, #db2777 100%);
    
    /* Typography */
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    
    /* Shadows - WOW Factor */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-hover: 0 15px 35px rgba(79, 70, 229, 0.15);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.4);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-pill: 9999px;
    
    /* Transitions */
    --trans-fast: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-smooth: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --trans-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Overrides */
html.dark-mode, body[data-theme="dark"] {
    --clr-bg: #0f172a;
    --clr-surface: rgba(30, 41, 59, 0.75);
    --clr-surface-solid: #1e293b;
    --clr-text-main: #f8fafc;
    --clr-text-muted: #94a3b8;
    --clr-border: rgba(255, 255, 255, 0.1);
    --clr-border-solid: #334155;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 15px 35px rgba(79, 70, 229, 0.3);
}

html.dark-mode body::before, body[data-theme="dark"]::before {
    background: #1e1b4b;
}

html.dark-mode body::after, body[data-theme="dark"]::after {
    background: #0c4a6e;
}

/* ================================================
   Reset & Base Setup
   ================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Dynamic Mesh Gradient Background (The WOW factor) */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: floatBg 20s infinite alternate ease-in-out;
}

body::before {
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #c7d2fe; /* Soft indigo */
}

body::after {
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #bae6fd; /* Soft sky blue */
    animation-delay: -10s;
}

@keyframes floatBg {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 50px) scale(1.1); }
    100% { transform: translate(50px, -50px) scale(0.9); }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ================================================
   Glassmorphism Utilities
   ================================================ */
.glass-panel {
    background: var(--clr-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-glass);
    border-radius: var(--radius-xl);
}

/* ================================================
   Header & Navigation
   ================================================ */
.header {
    position: sticky;
    top: 20px;
    margin: 0 auto;
    width: 95%;
    max-width: 1200px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-pill);
    transition: var(--trans-smooth);
}

.header:hover {
    box-shadow: var(--shadow-glass);
}

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

.header__logo-img {
    width: 40px;
    height: 40px;
    transition: transform var(--trans-bounce);
}

.header__logo:hover .header__logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.header__logo-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header__nav {
    display: none; /* Mobile hidden by default */
}

.header__nav-list {
    display: flex;
    gap: 8px;
}

.header__nav-link {
    font-weight: 700;
    color: var(--clr-text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: var(--trans-fast);
    position: relative;
    overflow: hidden;
}

.header__nav-link::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--clr-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--trans-fast);
    border-radius: var(--radius-pill);
}

.header__nav-link:hover, .header__nav-link.active {
    color: white;
}

.header__nav-link:hover::before, .header__nav-link.active::before {
    opacity: 1;
}

/* Hamburger */
.header__menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}

.header__menu-line {
    width: 20px;
    height: 2px;
    background: var(--clr-primary);
    border-radius: 2px;
    transition: var(--trans-smooth);
}

/* ================================================
   Layout / Main Sections
   ================================================ */
.page-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    flex-grow: 1;
}

.tab-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.tab-section.active-page {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ================================================
   Hero Section (Premium)
   ================================================ */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    background: var(--gradient-hero);
    padding: 60px 30px;
    border-radius: var(--radius-xl);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    margin-bottom: 60px;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.2"/></svg>') repeat;
    opacity: 0.5;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: right;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hero__subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero__image-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.hero__image {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
    animation: floatImg 6s ease-in-out infinite;
}

@keyframes floatImg {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ================================================
   Section Titles
   ================================================ */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 40px;
    color: var(--clr-text-main);
}

.section-title span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ================================================
   Product Grid & Premium Cards
   ================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: var(--clr-surface-solid);
    border-radius: var(--radius-xl);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--trans-bounce);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--clr-border-solid);
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--gradient-text);
    z-index: -1;
    border-radius: 32px;
    opacity: 0;
    transition: opacity var(--trans-smooth);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card:hover::before {
    opacity: 0.3;
}

.card__image-wrapper {
    background: var(--clr-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--trans-smooth);
}

.card:hover .card__image-wrapper {
    background: #fff;
}

.card__image {
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform var(--trans-bounce);
}

.card:hover .card__image {
    transform: scale(1.1) rotate(2deg);
}

.card__tag {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--clr-surface-solid);
    color: var(--clr-accent);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
    z-index: 2;
}

.card__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.card__meta {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    margin-bottom: 15px;
}

.card__desc {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    flex-grow: 1;
    margin-bottom: 20px;
}

.card__price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px dashed var(--clr-border-solid);
}

.card__price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--clr-primary);
}

.card__commission-value {
    background: #ecfdf5;
    color: #059669;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.9rem;
}

/* Quantity */
.card__qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--clr-bg);
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
}

.card__qty-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.card__qty-btn {
    background: var(--clr-surface-solid);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: var(--shadow-soft);
    transition: var(--trans-fast);
}

.card__qty-btn:hover {
    background: var(--clr-primary);
    color: white;
}

.card__qty-value {
    font-weight: 800;
    font-size: 1.1rem;
}

/* Actions */
.card__actions {
    display: flex;
    gap: 10px;
}

/* ================================================
   Buttons (Interactive & Pulse)
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--trans-bounce);
    font-family: inherit;
    text-decoration: none;
    padding: 12px 24px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

.btn--primary {
    background: var(--clr-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    flex-grow: 1;
}

.btn--primary:hover {
    background: var(--clr-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--clr-primary);
    color: var(--clr-primary);
    flex-grow: 1;
}

.btn--outline:hover {
    background: var(--clr-primary);
    color: white;
}

.btn--whatsapp {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10b981;
    font-size: 1.5rem;
    border: 2px solid #10b981;
}

.btn--whatsapp:hover {
    background: #10b981;
    color: white;
    transform: scale(1.1) rotate(10deg);
}

/* ================================================
   Affiliate / Dashboard (Glass Data Cards)
   ================================================ */
.affiliate__login {
    text-align: center;
    padding: 60px 20px;
}

.affiliate__login-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.affiliate__login-cta {
    background: white;
    color: var(--clr-text-main);
    padding: 16px 40px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: var(--shadow-glass);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--trans-bounce);
}

.affiliate__login-cta:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--clr-surface-solid);
    padding: 30px 20px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--clr-border-solid);
    transition: var(--trans-bounce);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--clr-primary);
}

.stat-card__value {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card__label {
    font-weight: 700;
    color: var(--clr-text-muted);
}

/* Dashboard Panel */
.affiliate__dashboard {
    display: none;
}

.affiliate__profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

.affiliate__tracking-badge {
    background: var(--clr-primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-weight: bold;
}

.affiliate__tracking-code {
    font-family: monospace;
    font-size: 1.1rem;
}

/* ================================================
   Tables (Modernized)
   ================================================ */
.table-wrapper {
    background: var(--clr-surface-solid);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--clr-border-solid);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th {
    background: var(--clr-bg);
    padding: 20px;
    font-weight: 800;
    color: var(--clr-text-muted);
}

td {
    padding: 20px;
    border-bottom: 1px solid var(--clr-border-solid);
    transition: background var(--trans-fast);
}

tbody tr:hover td {
    background: #f1f5f9;
}

.badge {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 800;
}

.badge--pending { background: #fef3c7; color: #d97706; }
.badge--completed { background: #d1fae5; color: #059669; }
.badge--ref { background: var(--clr-bg); border: 1px solid var(--clr-border-solid); }

/* ================================================
   Wiki / Content Pages (Glass styling)
   ================================================ */
.wiki {
    padding: 60px 40px;
}

.wiki__container {
    max-width: 800px;
    margin: 0 auto;
}

.wiki__title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wiki__heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
}

.wiki__paragraph {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--clr-text-muted);
}

.support {
    background: white;
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    margin-top: 40px;
}

.support__item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    background: white;
    padding: 60px 20px 20px;
    margin-top: auto;
    border-top: 1px solid var(--clr-border-solid);
}

.footer__grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__brand-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--clr-primary);
    margin-bottom: 15px;
}

.footer__link {
    display: block;
    color: var(--clr-text-muted);
    margin-bottom: 10px;
    transition: var(--trans-fast);
    font-weight: 600;
    cursor: pointer;
}

.footer__link:hover {
    color: var(--clr-primary);
    transform: translateX(-5px);
}

.footer__copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px dashed var(--clr-border-solid);
    color: var(--clr-text-muted);
    font-weight: 600;
}

/* ================================================
   Modals
   ================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal__content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: var(--shadow-hover);
    animation: zoomIn 0.4s var(--trans-bounce);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal__input {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 2px solid var(--clr-border-solid);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--trans-fast);
}

.modal__input:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.modal__actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* ================================================
   Responsive Overrides
   ================================================ */
@media (min-width: 768px) {
    .header__menu-btn { display: none; }
    
    .header__nav {
        display: block !important;
    }
    
    .hero {
        grid-template-columns: 1fr 1fr;
        text-align: right;
        padding: 80px 60px;
    }
    
    .hero__title {
        font-size: 4rem;
    }
}

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 50px 30px;
    }
    
    .hero__title {
        font-size: 3rem;
    }

    .hero__image-wrapper {
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .header {
        padding: 10px 15px;
    }

    .header__nav {
        position: absolute;
        top: 70px;
        left: 15px;
        right: 15px;
        background: white;
        padding: 20px;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-hover);
        flex-direction: column;
        display: none;
    }
    
    .header__nav--open {
        display: flex;
        animation: revealPage 0.3s forwards;
    }
    
    .header__nav-list {
        flex-direction: column;
        gap: 15px;
    }
    
    .card__qty {
        flex-direction: column;
        gap: 10px;
    }
    
    .wiki__title {
        font-size: 2.2rem;
    }

    /* Mobile Grid Overrides (2 Columns) */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card {
        padding: 10px;
    }
    .card__image-wrapper {
        height: 100px;
        padding: 10px;
        margin-bottom: 10px;
    }
    .card__title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    .card__desc-wrapper {
        display: none; /* Hide description on mobile to save space */
    }
    .card__price-row {
        padding: 8px 0;
    }
    .card__price {
        font-size: 1.1rem;
    }
    .card__actions {
        flex-direction: column;
        gap: 5px;
    }
    .card__btn-share, .card__btn-details {
        padding: 8px 10px;
        font-size: 0.8rem;
        width: 100%;
    }
    .card__tag {
        top: 10px;
        right: 10px;
        font-size: 0.65rem;
        padding: 4px 8px;
    }
}

/* ================================================
   NEW PRODUCT CARD DESIGN (APPROVED)
   ================================================ */
.product-card {
    background: var(--clr-surface-solid, #ffffff);
    border-radius: 20px;
    width: 100%;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card.out-of-stock {
    opacity: 0.6;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.product-image-container {
    background-color: #f8fafc;
    border-radius: 16px;
    height: 180px;
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.badge-best {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff5a1f;
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-heading);
    padding: 4px 14px;
    border-radius: 0 16px 0 16px;
    z-index: 10;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end; 
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
}

.rating-stars {
    color: #fbbf24;
    display: flex;
    gap: 2px;
    font-size: 1.1rem;
    line-height: 1;
}

.rating-stars .empty {
    color: #cbd5e1;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--clr-text-main);
    margin: 0;
    line-height: 1.4;
}

.product-title:hover {
    color: var(--clr-primary);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .divider {
    border: 0;
    height: 1px;
    border-top: 1px dashed #cbd5e1;
    margin: 2px 0;
}

.price-row {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--clr-primary, #4f46e5);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.product-card .btn {
    border: none;
    border-radius: 12px;
    padding: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.product-card .btn-primary {
    background-color: var(--clr-primary, #4f46e5);
    color: white;
    flex: 1;
}

.product-card .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.product-card .btn-secondary {
    background-color: #eef2ff;
    color: var(--clr-primary, #4f46e5);
    width: 44px;
    flex-shrink: 0;
}

.product-card .btn-secondary:hover {
    background-color: #e0e7ff;
    transform: translateY(-2px);
}
