/* ═══════════════════════════════════════════════════════════
   ROYAL BAGS — CATALOG PAGE
   Luxury Design System
   ═══════════════════════════════════════════════════════════ */

:root {
    --gold: #c9a961;
    --gold-dark: #a88945;
    --gold-light: #e8d5a8;
    --brown: #2c1810;
    --brown-light: #4a2f20;
    --cream: #faf7f2;
    --cream-dark: #f0e8dc;
    --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.06);
    --shadow-md: 0 8px 24px rgba(44, 24, 16, 0.10);
    --shadow-lg: 0 16px 40px rgba(44, 24, 16, 0.15);
    --radius: 16px;
}

/* ═══════════ Container ═══════════ */
.catalog {
    background: var(--cream);
    padding: 40px 0 80px;
    font-family: 'Alexandria', 'Segoe UI', sans-serif;
}

/* ═══════════ رأس الصفحة الفخم ═══════════ */
.catalog-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
    padding: 0 20px;
    position: relative;
}

.catalog-head__eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 15px;
    position: relative;
    padding: 0 40px;
}

    .catalog-head__eyebrow::before,
    .catalog-head__eyebrow::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 25px;
        height: 1px;
        background: var(--gold);
    }

    .catalog-head__eyebrow::before {
        right: 0;
    }

    .catalog-head__eyebrow::after {
        left: 0;
    }

.catalog-head__title {
    font-family: 'Amiri', 'Georgia', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 18px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.catalog-head__sub {
    color: #7a6b5d;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    font-weight: 400;
}

.catalog-head__divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto;
    border-radius: 2px;
}

/* ═══════════ شبكة رئيسية ═══════════ */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* ═══════════ لوحة التصفية ═══════════ */
.filters {
    background: #fff;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--cream-dark);
    position: sticky;
    top: 100px;
}

.filters__title {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    color: var(--brown);
    margin-bottom: 22px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--cream-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

    .filters__title i {
        color: var(--gold);
        font-size: 1rem;
    }

.filters__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filters__item {
    position: relative;
}

.filters__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filters__label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--brown);
    font-size: 0.92rem;
    font-weight: 500;
    border: 2px solid transparent;
}

    .filters__label:hover {
        background: var(--cream);
        border-color: var(--cream-dark);
    }

.filters__input:checked + .filters__label {
    background: linear-gradient(135deg, var(--brown), var(--brown-light));
    color: var(--gold);
    border-color: var(--brown);
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(44, 24, 16, 0.2);
}

.filters__count {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--cream-dark);
    color: var(--brown);
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.filters__input:checked + .filters__label .filters__count {
    background: var(--gold);
    color: var(--brown);
}

.filters__submit {
    display: none;
}

/* زر إعادة التصفية */
.filters__reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding: 10px;
    background: #fdf1f1;
    color: #b02a37;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

    .filters__reset:hover {
        background: #f8d7da;
        color: #721c24;
    }

/* ═══════════ العمود الرئيسي ═══════════ */
.catalog-main {
    min-width: 0;
}

.catalog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--cream-dark);
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-meta__count {
    font-size: 0.9rem;
    color: #666;
}

    .catalog-meta__count strong {
        color: var(--brown);
        font-weight: 700;
    }

.catalog-meta__page {
    font-size: 0.82rem;
    color: #999;
    background: var(--cream);
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
}

/* ═══════════ شبكة المنتجات ═══════════ */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* ═══════════ بطاقة المنتج ═══════════ */
.shop-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--cream-dark);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
}

    .shop-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
        border-color: var(--gold-light);
    }

/* ═══════════ صورة المنتج ═══════════ */
.shop-card__media {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--cream), #f5ebe0);
    overflow: hidden;
}

    .shop-card__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

.shop-card:hover .shop-card__media img {
    transform: scale(1.08);
}

.shop-card__ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 3rem;
    opacity: 0.6;
}

/* شارة الخصم */
.shop-card__off {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(220, 53, 69, 0.4);
    letter-spacing: 0.3px;
}

/* نفد المخزون */
.shop-card__soldout {
    position: absolute;
    inset: 0;
    background: rgba(44, 24, 16, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ═══════════ جسم البطاقة ═══════════ */
.shop-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-card__cat {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--gold-dark);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #fff9e6, #faf7f2);
    border-radius: 20px;
    align-self: flex-start;
    border: 1px solid var(--gold-light);
}

.shop-card__name {
    font-family: 'Amiri', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 2.8em;
}

.shop-card__link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

    .shop-card__link:hover {
        color: var(--gold-dark);
    }

/* ═══════════ الأسعار ═══════════ */
.shop-card__price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--cream-dark);
}

.price-now {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-dark);
    letter-spacing: -0.5px;
}

    .price-now .currency {
        font-size: 0.8rem;
        color: #a89999;
        font-weight: 600;
        margin-right: 3px;
    }

.price-was {
    font-size: 0.9rem;
    color: #b8a99a;
    text-decoration: line-through;
    font-weight: 500;
}

/* ═══════════ زر الإضافة للسلة ═══════════ */
.shop-card__form {
    padding: 0 20px 20px;
}

.btn-cart {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--brown), var(--brown-light));
    color: var(--gold);
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(44, 24, 16, 0.15);
    font-family: inherit;
}

    .btn-cart:hover:not(:disabled) {
        background: linear-gradient(135deg, var(--gold), var(--gold-dark));
        color: var(--brown);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(201, 169, 97, 0.4);
    }

    .btn-cart:disabled {
        background: #e0e0e0;
        color: #999;
        cursor: not-allowed;
        box-shadow: none;
    }

/* ═══════════ Pagination ═══════════ */
.pager-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pager {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pager__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: #fff;
    color: var(--brown);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--cream-dark);
    transition: all 0.25s;
}

    .pager__link:hover {
        border-color: var(--gold);
        background: var(--cream);
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(201, 169, 97, 0.2);
    }

.pager__link--active {
    background: linear-gradient(135deg, var(--brown), var(--brown-light));
    color: var(--gold);
    border-color: var(--brown);
    box-shadow: 0 6px 18px rgba(44, 24, 16, 0.25);
    cursor: default;
}

.pager__link--off {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

    .pager__link--off:hover {
        transform: none;
        border-color: var(--cream-dark);
        box-shadow: none;
    }

.pager__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    color: #999;
    font-weight: 700;
}

/* ═══════════ Empty State ═══════════ */
.catalog-empty {
    text-align: center;
    padding: 80px 30px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 2px dashed var(--cream-dark);
}

.catalog-empty__icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cream), #f5ebe0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gold);
    opacity: 0.8;
}

.catalog-empty h3 {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    color: var(--brown);
    margin-bottom: 12px;
    font-weight: 700;
}

.catalog-empty p {
    color: #999;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--brown);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 6px 18px rgba(201, 169, 97, 0.3);
    border: none;
    font-family: inherit;
}

    .btn-gold:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(201, 169, 97, 0.45);
        color: var(--brown);
    }

/* ═══════════ Notes (تنبيهات) ═══════════ */
.note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.92rem;
    font-weight: 600;
    animation: slideDown 0.4s ease;
}

.note--ok {
    background: linear-gradient(135deg, #d4edda, #e8f5e9);
    color: #155724;
    border-right: 4px solid #28a745;
}

.note--err {
    background: linear-gradient(135deg, #f8d7da, #fee);
    color: #721c24;
    border-right: 4px solid #dc3545;
}

.note i {
    font-size: 1.2rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════ Responsive ═══════════ */
@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .filters {
        position: static;
    }

    .filters__list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .catalog-head__title {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .catalog {
        padding: 25px 0 60px;
    }

    .catalog-head {
        margin-bottom: 35px;
    }

    .catalog-head__eyebrow {
        font-size: 0.68rem;
        letter-spacing: 3px;
    }

    .catalog-head__title {
        font-size: 1.8rem;
    }

    .catalog-head__sub {
        font-size: 0.9rem;
    }

    .shop-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .shop-card__name {
        font-size: 1rem;
    }

    .catalog-meta {
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    .pager__link {
        min-width: 38px;
        height: 38px;
        padding: 0 12px;
        font-size: 0.82rem;
    }
}
