﻿/* ═══════════════════════════════════════════════════
   PRODUCT CARD — Luxury Responsive Design
   ═══════════════════════════════════════════════════ */

:root {
    --gold: #c9a961;
    --gold-dark: #b8934a;
    --gold-light: #e8d5a3;
    --ink: #1a1a1a;
    --ink-soft: #4a4a4a;
    --muted: #8a8a8a;
    --line: #ebe6dd;
    --bg-soft: #faf8f4;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.04);
    --shadow-md: 0 8px 24px rgba(26, 26, 26, 0.08);
    --shadow-lg: 0 16px 40px rgba(26, 26, 26, 0.12);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── البطاقة الأساسية ─── */
.product-lux,
.shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    height: 100%;
    border: 1px solid var(--line);
}

    .product-lux:hover,
    .shop-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
    }

/* ─── رابط البطاقة الكامل ─── */
.product-lux__link,
.shop-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

    .product-lux__link:active,
    .shop-card__link:active {
        transform: scale(0.98);
        transition: transform 0.15s var(--ease);
    }

/* ─── منطقة الصورة ─── */
.product-lux__media,
.shop-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-soft);
}

    .product-lux__media img,
    .shop-card__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s var(--ease);
        display: block;
    }

.product-lux:hover .product-lux__media img,
.shop-card:hover .shop-card__media img {
    transform: scale(1.08);
}

/* Placeholder */
.product-lux__ph,
.shop-card__ph {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--gold);
    font-size: 2.5rem;
    background: linear-gradient(135deg, #faf8f4, #f0ebe0);
}

/* ─── شارة الخصم ─── */
.product-lux__off,
.shop-card__off {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: linear-gradient(135deg, #c9302c, #a52824);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(201, 48, 44, 0.3);
    z-index: 2;
}

/* ─── شارة نفاد المخزون ─── */
.product-lux__soldout,
.shop-card__soldout {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(26, 26, 26, 0.65);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    z-index: 2;
}

/* ─── Overlay عند المرور ─── */
.product-lux__overlay {
    position: absolute;
    inset: 0;
    background: transparent; /* ← لا يوجد تعتيم */
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    z-index: 3;
    pointer-events: none; /* لا يعترض النقرات */
}
.product-lux:hover .product-lux__overlay {
    opacity: 1;
}

.quick-look {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px; /* الزاوية العلوية اليمنى */
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--brown, #2c1810);
    border-radius: 50%;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.18);
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(201, 169, 97, 0.4);
    transform: translateY(-6px) scale(0.85);
    transition: all 0.35s var(--ease, cubic-bezier(0.4,0,0.2,1));
    pointer-events: auto; /* ← قابل للنقر */
    cursor: pointer;
}

.product-lux:hover .quick-look {
    transform: translateY(0) scale(1);
}
.quick-look:hover {
    background: var(--gold, #c9a961);
    color: #fff;
    border-color: var(--gold, #c9a961);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
}
.quick-look i {
    font-size: 0.9rem;
}

/* ─── جسم البطاقة ─── */
.product-lux__body,
.shop-card__body {
    padding: 14px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-lux__cat,
.shop-card__cat {
    font-size: 0.7rem;
    color: var(--gold-dark);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Alexandria', sans-serif;
}

.product-lux__name,
.shop-card__name {
    font-family: 'Alexandria', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s var(--ease);
}

.product-lux:hover .product-lux__name,
.shop-card:hover .shop-card__name {
    color: var(--gold-dark);
}

/* ─── صف السعر ─── */
.product-lux__price-row,
.shop-card__price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 6px;
}

.price-tag,
.price-now {
    font-family: 'Alexandria', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.3px;
}

    .price-tag small,
    .price-now .currency {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--muted);
        margin-inline-start: 2px;
    }

.price-tag-old,
.price-was {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 400;
}

/* ─── زر السلة ─── */
.product-lux__form,
.shop-card__form {
    padding: 8px 14px 14px;
    margin: 0;
}

.btn-add-cart,
.btn-cart {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Alexandria', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

    .btn-add-cart::before,
    .btn-cart::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--gold), var(--gold-dark));
        opacity: 0;
        transition: opacity 0.3s var(--ease);
        z-index: 0;
    }

    .btn-add-cart:hover::before,
    .btn-cart:hover::before {
        opacity: 1;
    }

    .btn-add-cart i,
    .btn-add-cart span,
    .btn-cart i,
    .btn-cart span {
        position: relative;
        z-index: 1;
    }

    .btn-add-cart:hover,
    .btn-cart:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(201, 169, 97, 0.35);
    }

    .btn-add-cart:active,
    .btn-cart:active {
        transform: translateY(0) scale(0.98);
    }

    .btn-add-cart:disabled,
    .btn-cart:disabled {
        background: #e5e5e5;
        color: #999;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

        .btn-add-cart:disabled::before,
        .btn-cart:disabled::before {
            display: none;
        }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — Mobile First
   ═══════════════════════════════════════════════════ */

/* ─── الهاتف الصغير (أقل من 480px) ─── */
@media (max-width: 479px) {
    .product-lux__body,
    .shop-card__body {
        padding: 10px 12px 6px;
        gap: 4px;
    }

    .product-lux__name,
    .shop-card__name {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .product-lux__cat,
    .shop-card__cat {
        font-size: 0.62rem;
    }

    .price-tag,
    .price-now {
        font-size: 0.95rem;
    }

        .price-tag small,
        .price-now .currency {
            font-size: 0.65rem;
        }

    .price-tag-old,
    .price-was {
        font-size: 0.7rem;
    }

    .product-lux__form,
    .shop-card__form {
        padding: 6px 10px 10px;
    }

    .btn-add-cart,
    .btn-cart {
        padding: 9px 12px;
        font-size: 0.75rem;
        gap: 6px;
        border-radius: 10px;
    }

        .btn-add-cart i,
        .btn-cart i {
            font-size: 0.8rem;
        }

    .product-lux__off,
    .shop-card__off {
        top: 8px;
        inset-inline-start: 8px;
        padding: 3px 8px;
        font-size: 0.6rem;
    }

    .product-lux__soldout,
    .shop-card__soldout {
        font-size: 0.75rem;
    }

    .quick-look {
        width: 32px;
        height: 32px;
        top: 8px;
        inset-inline-end: 8px;
        font-size: 0.75rem;
    }

        .quick-look span {
            display: none; /* إخفاء النص على الشاشات الصغيرة */
        }

        .quick-look i {
            font-size: 0.78rem;
        }
}

/* ─── الهاتف المتوسط (480px - 767px) ─── */
@media (min-width: 480px) and (max-width: 767px) {
    .product-lux__name,
    .shop-card__name {
        font-size: 0.9rem;
    }

    .price-tag,
    .price-now {
        font-size: 1rem;
    }

    .btn-add-cart,
    .btn-cart {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* ─── الأجهزة اللوحية (768px - 991px) ─── */
@media (min-width: 768px) and (max-width: 991px) {
    .product-lux__name,
    .shop-card__name {
        font-size: 1rem;
    }
}

/* ─── الحاسوب (992px+) ─── */
@media (min-width: 992px) {
    .product-lux__body,
    .shop-card__body {
        padding: 16px 18px 10px;
    }

    .product-lux__name,
    .shop-card__name {
        font-size: 1rem;
    }

    .price-tag,
    .price-now {
        font-size: 1.15rem;
    }

    .btn-add-cart,
    .btn-cart {
        padding: 12px 20px;
        font-size: 0.88rem;
    }
}

/* ─── الشاشات الكبيرة جداً ─── */
@media (min-width: 1400px) {
    .product-lux__name,
    .shop-card__name {
        font-size: 1.05rem;
    }

    .price-tag,
    .price-now {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════════════════
   ACCESSIBILITY & TOUCH
   ═══════════════════════════════════════════════════ */

/* تحسين اللمس على الهاتف */
@media (hover: none) {
    .product-lux__overlay {
        opacity: 1;
    }

    .quick-look {
        transform: translateY(0) scale(1);
    }

    .product-lux:hover,
    .shop-card:hover {
        transform: none;
    }

    .product-lux:active,
    .shop-card:active {
        transform: scale(0.98);
    }
}

/* تقليل الحركة لمن يفضّل ذلك */
@media (prefers-reduced-motion: reduce) {
    .product-lux,
    .shop-card,
    .product-lux__media img,
    .shop-card__media img,
    .btn-add-cart,
    .btn-cart {
        transition: none !important;
    }
}

/* ─── تركيز لوحة المفاتيح ─── */
.product-lux__link:focus-visible,
.shop-card__link:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.btn-add-cart:focus-visible,
.btn-cart:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
/* ═══════════════════════════════════════════════════
   SHOP-CARD QUICK LOOK BUTTON (زر العين للكتالوج)
   ═══════════════════════════════════════════════════ */

.shop-card__quick-look {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--brown, #2c1810);
    border-radius: 50%;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.18);
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(201, 169, 97, 0.4);
    opacity: 0;
    transform: translateY(-6px) scale(0.85);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    pointer-events: auto;
}

.shop-card:hover .shop-card__quick-look {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.shop-card__quick-look i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.shop-card__quick-look:hover {
    background: var(--gold, #c9a961);
    color: #fff;
    border-color: var(--gold, #c9a961);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
}

    .shop-card__quick-look:hover i {
        transform: scale(1.1);
    }

/* ─── على الهاتف: يظهر دائماً ─── */
@media (hover: none) {
    .shop-card__quick-look {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── شاشات صغيرة: زر أصغر ─── */
@media (max-width: 479px) {
    .shop-card__quick-look {
        width: 32px;
        height: 32px;
        top: 8px;
        inset-inline-end: 8px;
    }

        .shop-card__quick-look i {
            font-size: 0.75rem;
        }
}

/* ─── تصحيح رابط البطاقة الكامل ─── */
.shop-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

    .shop-card__link:active {
        transform: scale(0.98);
        transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

/* ─── إزالة رابط الاسم لأن الرابط أصبح على البطاقة كاملة ─── */
.shop-card__name {
    /* لا حاجة لتنسيقات الرابط القديم */
    pointer-events: none; /* يمنع منع النقر المزدوج */
}