/* Section Titles */
.section-title {
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0px;
    font-size: 32px;
    color: #d4af37 !important; /* Force Gold Color */
    font-weight: 800;
    margin-bottom: 0;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: default;
}

.section-title:hover {
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.9), 0 0 30px rgba(212, 175, 55, 0.6);
    transform: scale(1.05); /* Highlight/zoom effect */
}

/* Categories Section */
.category-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: transparent !important; /* Transparent for premium look */
    border: 2px solid transparent !important; /* Hidden border by default */
    border-radius: 15px; /* Matched to products */
    transition: all 0.3s ease;
}

.category-box:hover {
    border: 2px solid #d4af37 !important; /* Gold Border Hover - Restored */
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
    transform: translateY(-5px);
}

.category-img-container {
    height: 368px; /* +15% from 320px */
    width: 100%;
    overflow: hidden;
    padding: 0; 
    background: transparent !important;
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Back to original cover style */
    transition: transform 0.3s ease;
}

.category-box:hover .category-img {
    transform: scale(1.1); /* Slightly more zoom for premium feel */
}

.category-title {
    color: #ffffff !important; /* White text for dark sections */
    margin-bottom: 0;
    font-weight: 700;
    text-align: center;
}

/* Slider Arrows Common */
.slider-arrows {
    display: inline-flex;
    gap: 1rem;
}

.arrow-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.arrow-btn:hover {
    background: #d4af37;
    color: #121212; /* Dark text on gold bg */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}
/* Centered Header Row Strategy */
.centered-header-row {
    position: relative;
    min-height: 50px; /* Ensure row has height */
}

/* On Desktop/Tablet: Absolute Center the Title */
@media (min-width: 768px) {
    .centered-header-row .col-6:first-child,
    .centered-header-row .col-md-6:first-child {
        position: absolute;
        width: 100%;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        text-align: center !important;
        z-index: 1;
        pointer-events: none; /* Let clicks pass through */
    }
    
    .centered-header-row .col-6:last-child,
    .centered-header-row .col-md-6:last-child {
        position: relative;
        z-index: 2;
        pointer-events: none; /* Wrapper shouldn't block */
        text-align: left !important; /* FIXED: Push arrows to the edge to avoid overlap with centered title */
        direction: ltr; /* Force LTR container for arrows if needed to keep order, otherwise just align left */
    }

    .centered-header-row .slider-arrows {
        pointer-events: auto; /* Re-enable buttons */
    }
}

/* Mobile: Stack naturally, just center text */
@media (max-width: 767px) {
    .centered-header-row .col-6 {
        width: 100%;
        text-align: center !important;
        margin-bottom: 10px;
    }
    .centered-header-row .text-end,
    .centered-header-row .text-start {
        text-align: center !important;
    }
    .slider-arrows {
        justify-content: center;
    }
}

/* Swiper Shadow Fix */
.swiper-overflow-fix {
    padding: 20px 10px 40px 10px !important; /* Extra bottom padding for shadows */
    margin: -20px -10px -40px -10px; /* Negative margin to compensate layout */
    overflow: hidden;
}

.swiper-slide {
    height: auto; /* Ensure slide takes height */
}

/* =========================================
   [تعليق عربي] إصلاحات الـ Responsive الشاملة لصفحة الهوم (Mobile Home Fixes)
   ========================================= */
@media (max-width: 430px) {
    /* [تعليق عربي] تقليل هوامش ومساحات أقسام الهوم لتوفير مساحة العرض */
    .S4_home, .all-products-section {
        padding-top: 25px !important;
        padding-bottom: 25px !important;
    }
    section.mt-5.mb-5 {
        margin-top: 25px !important;
        margin-bottom: 25px !important;
    }

    /* [تعليق عربي] تصغير عناوين الأقسام لتناسب الشاشة وتجنب التداخل */
    .section-title {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    /* [تعليق عربي] منع تداخل أسهم السلايدر مع العنوان بوضعهم أسفله مباشرة مع تمركزهم */
    .centered-header-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    .centered-header-row .position-absolute {
        position: relative !important;
        padding-left: 0 !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* [تعليق عربي] تقسيم الكروت لعمودين بدلاً من عمود واحد لمنتجات/أقسام الهوم */
    section.mt-5.mb-5 .row.g-4 > .col-sm-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
    
    /* [تعليق عربي] تم حذف الارتفاع الثابت لصالح aspect-ratio في image_fit.css */
    section.mt-5.mb-5 .product-img-wrapper, 
    .S4_home .product-img-wrapper, 
    .all-products-section .product-img-wrapper {
        height: auto !important;
    }
    
    /* [تعليق عربي] تقليم المسافات داخل الكارت لتناسب حجم الموبايل */
    section.mt-5.mb-5 .product-content,
    .S4_home .product-content,
    .all-products-section .product-content {
        padding: 12px !important;
    }
    .S4_home .product-title,
    .all-products-section .product-title {
        font-size: 0.95rem !important;
        height: 2.8em !important;
    }
    .S4_home .price-tag,
    .all-products-section .price-tag {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
    }
    .S4_home .btn-login-style,
    .all-products-section .btn-login-style {
        height: 40px !important;
        font-size: 14px !important;
    }
    
    /* [تعليق عربي] ضبط أحجام أسهم الملاحة للسلايدر */
    .arrow-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 390px) {
    /* [تعليق عربي] تم حذف الارتفاع الثابت لصالح aspect-ratio في image_fit.css */
    section.mt-5.mb-5 .product-img-wrapper, 
    .S4_home .product-img-wrapper, 
    .all-products-section .product-img-wrapper {
        height: auto !important;
    }
    .section-title {
        font-size: 20px !important;
    }
    .S4_home .product-title,
    .all-products-section .product-title {
        font-size: 0.9rem !important;
    }
    .S4_home .btn-login-style,
    .all-products-section .btn-login-style {
        height: 38px !important;
        font-size: 13px !important;
    }
}

/* =========================================
   Circular Sections Slider (Refinement)
   ========================================= */
.sections-slider-wrapper {
    padding: 20px 10px; /* Equal vertical spacing */
}

#sections-slider .swiper-slide {
    width: auto; /* Allow auto sizing for flex centering */
    display: flex;
    justify-content: center;
}

.section-circle-wrapper {
    transition: all 0.3s ease;
    padding: 15px; /* Equal horizontal/vertical breathing room */
}

.section-circle {
    width: 210px;
    height: 210px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.2);
    background: #1a1a1a;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Remove padding to allow image to fill to the edges */
}

.section-circle-wrapper:hover .section-circle {
    border-color: #d4af37;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 25px rgba(212, 175, 55, 0.3);
}

.section-img {
    width: 100%;
    height: 100%;
    object-fit: cover !important; /* Zoom-in: fills the circle completely without distortion */
    transition: transform 0.5s ease;
}

.section-circle-wrapper:hover .section-img {
    transform: scale(1.1);
}

.section-placeholder {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: rgba(212, 175, 55, 0.4);
    font-size: 2.5rem;
}

.section-name {
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.section-circle-wrapper:hover .section-name {
    color: #d4af37 !important;
}

/* Responsive Circles */
@media (max-width: 768px) {
    .section-circle {
        width: 160px;
        height: 160px;
        padding: 0;
    }
    .section-name {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .section-circle {
        width: 130px;
        height: 130px;
        padding: 0;
    }
}
