/* ============ HOME PAGE GLOBAL STYLES ============ */
.section-header {
    display: flex;
    flex-direction: column;
}

#main > div > section > div > a {
    font-size: 17px;
    font-weight: 600;
    color: #fafafa;
    border-radius: 10px;
    padding: 4px 30px;
    background: var(--primary-color);
}

/* ============ HOME PAGE LAYOUT ============ */
.home-wrapper {
    max-width: 100%;
    width: 1320px;
    padding: 20px 0px;
}

.home-box {
    background-position: center;
    background-size: cover;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* צבעי רקע ספציפיים לכל קטגוריה */
.home-rolex {
    background-color: #121212;
}
.home-patek {
    background-color: #1e1e1e;
}
.home-audemars {
    background-color: #263238;
}
.home-richard {
    background-color: #191919;
}

/* אנימציית טעינה */
.bg-loaded {
    animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* ============ DESKTOP - 1025px ומעלה ============ */
@media (min-width: 1025px) {
    .home-grid {
        display: grid;
        grid-template-areas:
            "rolex patek patek"
            "rolex audemars richard";
        grid-template-columns: 2.2fr 1fr 1fr;
        grid-template-rows: 250px 280px;
        gap: 20px;
    }
    
    .home-rolex {
        grid-area: rolex;
    }
    
    .home-patek {
        grid-area: patek;
    }
    
    .home-audemars {
        grid-area: audemars;
    }
    
    .home-richard {
        grid-area: richard;
    }
    
    /* Home Box Animation Effects */
    .home-box::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: inherit;
        background-size: cover;
        background-position: center;
        z-index: 0;
        transition: transform 0.8s ease;
        transform: scale(1);
    }
    h2.section-title {
    font-size: 24px;
}

    .home-box:hover::before {
        transform: scale(1.2);
    }
    
    .home-box::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: radial-gradient(
          circle at center,
          rgba(255, 255, 255, 0.05) 0%,
          rgba(0, 0, 0, 0.1) 40%,
          rgba(0, 0, 0, 0.4) 100%
        );
        opacity: 0;
        transition: opacity 0.6s ease;
    }
    
    .home-box:hover::after {
        opacity: 1;
    }
    
    /* Content Overlay */
    .home-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
        padding: 20px;
        width: 100%;
        text-align: left;
        position: relative;
        z-index: 2;
    }
    
    .home-overlay h2 {
        font-size: 22px;
        margin: 0 0 5px;
    }
    
    .home-overlay p {
        font-size: 15px;
        margin-bottom: 10px;
        line-height: 1.6;
        color: #e2e2e2;
        width: 95%;
        font-weight: 200;
    }
    
    /* כפתור לדסקטופ */
    .home-btn.desktop-only {
        display: inline-block !important;
        background: #4f636a;
        color: #ffffff;
        padding: 10px 20px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: bold;
        transition: background 0.3s;
        font-size: 16px;
        cursor: pointer;
    }
    
    .home-btn.desktop-only:hover {
        background: #7696a1;
        color: #ffffff;
    }
}

/* ============ TABLET - 768px עד 1024px ============ */
@media (min-width: 768px) and (max-width: 1024px) {
    .home-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 1%;
    }
    
    /* שורה ראשונה - רולקס */
    .home-box.home-rolex {
        width: 100%;
        height: 250px;
        order: 1;
    }
    
    /* שורה שנייה - כל השאר */
    .home-box.home-patek {
        width: calc(33.333% - 7px);
        height: 180px;
        order: 2;
    }
    
    .home-box.home-audemars {
        width: calc(33.333% - 7px);
        height: 180px;
        order: 3;
    }
    
    .home-box.home-richard {
        width: calc(33.333% - 7px);
        height: 180px;
        order: 4;
    }
    h2.section-title {
    font-size: 24px;
}

}

/* ============ MOBILE - עד 767px ============ */
@media (max-width: 767px) {
    .home-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 1%;
    }
    
    /* רולקס - שורה ראשונה */
    .home-box.home-rolex {
        width: 100%;
        height: 220px;
        order: 1;
    }
    
    /* אודמרס וריצ'רד - שורה שנייה */
    .home-box.home-audemars {
        width: calc(50% - 5px);
        height: 150px;
        order: 2;
    }
    
    .home-box.home-richard {
        width: calc(50% - 5px);
        height: 150px;
        order: 3;
    }
    
    /* פטק - שורה שלישית */
    .home-box.home-patek {
        width: 100%;
        height: 110px;
        order: 4;
    }
    h2.section-title {
    font-size: 20px;
}

}

/* ============ MOBILE & TABLET SHARED STYLES ============ */
@media (max-width: 1024px) {
    /* הסתרת כפתורים */
    .desktop-only {
        display: none !important;
    }
    
    /* קישור על כל הקופסה */
    a.home-link-mobile {
        text-decoration: none;
        color: inherit;
        display: block;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* אפקט לחיצה */
    a.home-link-mobile:active {
        opacity: 0.9;
        transform: scale(0.98);
    }
    
    /* הסרת אנימציות hover */
    .home-box::before,
    .home-box::after {
        display: none;
    }
    
    /* הסתרת תיאורים במובייל */
    .home-overlay p {
        display: none;
    }
    
    /* Overlay למובייל */
    .home-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
        padding: 15px;
        width: 100%;
        position: relative;
        z-index: 2;
    }
    
    /* כותרות במובייל */
    .home-overlay h2 {
        color: #fafafa;
        margin: 0;
        font-size: 18px;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    }


    
}

/* ============ PRODUCT SECTIONS ============ */
h2.section-title {
    text-align: center;
    text-decoration: overline;
    color: var(--primary-color);
    margin: 0;
    /* Accessibility: Subtle text shadow for better contrast without changing appearance */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

p.section-subtitle {
    text-align: center;
    color: #7a7a7a;
    font-size:16px;
    /* Accessibility: Enhanced text shadow for better contrast */
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.6), 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(255, 255, 255, 0.4);
    position: relative;
}

p.section-subtitle::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    z-index: -1;
    pointer-events: none;
}

/* Accessibility: Hidden text for screen readers to improve contrast issues */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Accessibility: Improve contrast for product links and text without changing visual appearance */
.product-card a {
    /* Add subtle text shadow for better readability */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

.product-card bdi {
    /* Add subtle text shadow for price text */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}



section.product-grid-wrapper {
    padding: 0;
}
