/* ======================= GLOBAL & VARIABLES ======================= */
:root {
    --primary-color: #882266;
    --dark-color: #1a1a1a;
    --light-gray: #f8f9fa;
    --text-color: #333;
    --font-family: "Tajawal", sans-serif;
}

body {
    font-family: var(--font-family);
    color: white;
}

/* Custom Button Style */
.btn-style {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-style:hover,
.btn-style:focus {
    background-color: #6d1b51;
    color: white;
    border-color: #6d1b51;
}

/* ======================= HERO SECTION ======================= */
.hero-slide-item {
    position: relative;
    height: 515px;
    border-radius: 15px;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.hero-slide-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0) 50%
    );
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    color: white;
}
.hero-slide-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero-slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    width: 12px;
    height: 12px;
}
.hero-slider .swiper-pagination-bullet-active {
    background: var(--primary-color);
}
.side-banner {
    position: relative;
    flex-grow: 1;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    padding: 1.5rem;
    display: flex;
    align-items: flex-end;
    color: white;
    min-height: 220px;
}
.side-banner-content h2,
.side-banner-content h3 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
.side-banner .side-banner-content {
    width: 100%;
}
.discount-tag {
    position: absolute;
    top: -83px;
    left: -83px;
    width: 150px;
    height: 150px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    transform: rotate(-45deg);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ======================= SECTIONS STYLING ======================= */
.section-container {
    background-color: white;
    color: var(--text-color);
    border-radius: 15px;
    padding: 2rem;
}
.product-slider-section {
    background-color: white;
    padding: 30px 0;
}
.product-slider-section .section-container {
    padding: 0; /* remove padding to make slider full-width inside */
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

/* ======================= CATEGORIES SECTION ======================= */
.category-item {
    text-align: center;
}
.category-item a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}
.category-item a:hover {
    color: var(--primary-color);
}
.icon-circle {
    width: 80px;
    height: 80px;
    background-color: #f2e4ec;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    transition: background-color 0.3s ease;
}
.icon-circle i {
    font-size: 2rem;
    color: var(--primary-color);
}
.category-item a:hover .icon-circle {
    background-color: var(--primary-color);
}
.category-item a:hover .icon-circle i {
    color: white;
}
.category-item p {
    font-weight: 500;
    margin-bottom: 0;
    text-align: center;
}

/* Product Slider */

.product-slider .swiper-button-next,
.product-slider .swiper-button-prev {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}
.product-slider .swiper-button-next::after,
.product-slider .swiper-button-prev::after {
    font-size: 1rem;
    font-weight: 700;
}
.product-slider .swiper-button-prev {
    left: 0;
}
.product-slider .swiper-button-next {
    left: 15px;
}

/* ======================= CTA BANNER ======================= */
.cta-banner {
    background-size: cover;
    background-position: center;
    min-height: 300px;
    border-radius: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 2rem;
    overflow: hidden;
}
.cta-banner::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(44, 15, 34, 0.7);
    z-index: 1;
}
.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.cta-content h1 {
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* ======================= IMPORTANT OFFERS ======================= */
.offers-list-box {
    background-color: #2c2c2c;
    border-radius: 15px;
    padding: 1.5rem;
}
.offers-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.offers-list-box ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #eee;
    text-decoration: none;
    padding: 0.75rem;
    background-color: #3d3d3d;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}
.offers-list-box ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-5px);
}

/* ======================= NEW ARRIVALS FILTERS ======================= */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.filter-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    background-color: #f1f1f1;
}
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
@media (max-width: 991px) {
    .filters {
        width: 100%;
        margin-top: 1rem;
    }
    
}
@media (max-width: 768px) {
    .hero-slide-content h1{
        font-size: 2rem ;
    }
    .hero-slide-item {
        height: 208px;
    }
    .side-banner{
            padding: 0.5rem;
            width: 50%;
    }
    .side-banner .side-banner-content {
        width: 100%;
        text-align: center;
    }
    .side-banner-content h2, .side-banner-content h3{
        font-size: 1.2em ;
         text-align: center;
    }
}

/* ======================= ENHANCED PRODUCT CARD ======================= */
/* ======================================= */
/* == MODERN & INTERACTIVE PRODUCT CARD == */
/* ======================================= */

:root {
    --text-color: #1a1a1a;
    --subtle-gray: #f5f5f7;
    --border-color: #e5e7eb;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    position: relative; /* مهم للـ position absolute */
    overflow: hidden; /* لإخفاء أي عناصر تخرج عن الحواف الدائرية */
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.product-image {
    position: relative;
    overflow: hidden; /* لإخفاء زوائد الصورة عند التكبير */
}

.product-image a {
    display: block;
}

.product-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* --- التأثيرات على الصورة --- */
.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* زر المفضلة */
.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, color 0.2s, background-color 0.2s;
}
.wishlist-btn:hover {
    transform: scale(1.1);
}
.wishlist-btn.active {
    background-color: #e74c3c;
    color: #fff !important; /* مهم لفرض اللون */
}
.wishlist-btn .fa-heart {
    font-size: 16px;
}

/* --- الجزء السفلي (المعلومات والأزرار) --- */

.product-info {
    padding: 0.8rem 1rem 1rem;
    text-align: right;
    position: relative;
}

.product-title {
    font-size: 0.9rem; /* خط أصغر وأنعم */
    font-weight: 500;
    margin-bottom: 0.4rem;
    white-space: nowrap; /* لمنع نزول العنوان لسطر ثاني */
    overflow: hidden;
    text-overflow: ellipsis; /* إضافة '...' لو كان العنوان طويلاً */
}
.product-title a {
    text-decoration: none;
    color: var(--text-color);
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color); /* لون أسود عريض */
    margin-bottom: 0.5rem;
}

/* --- الجزء الأهم: زر "أضف للسلة" المخفي --- */
.add-to-cart-container {
    position: absolute;
    bottom: -100px; /* زيادة المسافة قليلاً لاستيعاب الزرين */
    left: 0;
    right: 0;
    padding: 1rem;
    opacity: 0;
    transition: all 0.35s ease-in-out;
    display: flex; /* <-- تغيير مهم */
    flex-direction: column; /* <-- ترتيب الأزرار عموديًا */
    gap: 0.5rem; /* <-- مسافة بين الزرين */
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 1) 70%,
        rgba(255, 255, 255, 0)
    ); /* تدرج لوني جميل */
}

.product-card:hover .add-to-cart-container {
    opacity: 1;
    bottom: 0; /* يصعد ليصبح مرئيًا */
}

/* -- زر أضف للسلة (يبقى كما هو) -- */
.btn-add-to-cart-main {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    width: 100%;
    padding: 0.7rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    cursor: pointer;
}
.btn-add-to-cart-main div {
    text-align: center;
}
.btn-add-to-cart-main:hover {
    background-color: #531478;
}

/* -- زر شراء الآن (جديد) -- */
.btn-buy-now-main {
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: color 0.2s;
}

.btn-buy-now-main:hover {
    color: var(--primary-color);
}
/* --- Feature Bar --- */
.feature-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem 0;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-color);
}
.feature-item-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}
.feature-item-text h6 {
    font-weight: 700;
    margin-bottom: 0.1rem;
}
.feature-item-text p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}
/* ======================================= */
/* == ENHANCED FEATURE & DISCOUNT BARS  == */
/* ======================================= */

/* --- Enhanced Feature Bar --- */
.feature-bar {
    padding: 1.5rem 0;
    position: relative;
}

/* On Desktop: Use Grid Layout */
.feature-items-container.is-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 2rem;
}

/* On Mobile: Make it a Horizontal Scroller */
.feature-items-container.is-mobile {
    display: flex;
    overflow-x: auto;
    padding-bottom: 1rem; /* Space for the scrollbar */
    gap: 1.5rem;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.feature-items-container.is-mobile::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0; /* Prevents items from shrinking in the scroller */
    min-width: 220px; /* Minimum width for each item on mobile */
}

.feature-item-icon {
    font-size: 2.25rem;
    color: var(--primary-color, #6a1b9a);
    width: 50px;
    text-align: center;
}
.feature-item-text h6 {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.1rem;
}
.feature-item-text p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}


/* --- Enhanced Discount Code Bar --- */
.discount-code-section {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    /*margin: 3rem 0;*/
}
.discount-code-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 1.5rem;
}

.discount-code-item {
    text-align: center;
    padding: 1.5rem 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.discount-code-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.discount-code-item .code-label {
    font-size: 0.9rem;
    color: #6b7280;
}
.discount-code-item .code {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0.25rem 0;
}
.discount-code-item .condition {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}