/* Dynamic Home Sections - extracted from style.css */

/* ==========================================================================
   Dynamic Home Sections (managed from admin)
   ========================================================================== */
.dynamic-home-section {
    margin-top: 12px;
    padding: 24px 0;
}

.dynamic-home-text-card,
.dynamic-home-products-wrap {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 16px;
}

.dynamic-home-text-card {
    padding-top: 10px;
    padding-bottom: 12px;
}

.dynamic-home-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2b2218;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dynamic-home-title i {
    font-size: 0.9em;
    color: rgba(43, 34, 24, 0.85);
}

.dynamic-home-subtitle,
.dynamic-home-text {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #5f5a53;
    text-align: right;
}

.dynamic-home-products-wrap .dynamic-home-subtitle {
    text-align: center;
    margin-top: -10px;
    margin-bottom: 14px;
}

.dynamic-home-products-wrap .dynamic-home-products-crown i {
    background-image: linear-gradient(
        90deg,
        var(--dynamic-accent-color, #b8963a) 0%,
        var(--dynamic-accent-color, #b8963a) 40%,
        #ffffff 50%,
        var(--dynamic-accent-color, #b8963a) 60%,
        var(--dynamic-accent-color, #b8963a) 100%
    ) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: dynCrownShimmer 2.5s ease-in-out infinite !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

@keyframes dynCrownShimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.dynamic-home-products-title {
    margin-bottom: 18px;
}

.dynamic-home-products-wrap .dynamic-home-products-title::before {
    content: attr(data-en) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: var(--dynamic-accent-color, #b8963a) !important;
    color: var(--dynamic-accent-color, #b8963a) !important;
}

.dynamic-home-products-title::after {
    background: linear-gradient(90deg, transparent 0%, var(--dynamic-accent-color, #b8963a) 50%, transparent 100%);
}

.dynamic-home-btn {
    display: inline-block;
    background: #2b2218;
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.dynamic-home-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dynamic-home-product-card {
    border: 1px solid #ece7df;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.dynamic-home-product-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.dynamic-home-product-info {
    padding: 8px;
    text-align: right;
}

.dynamic-home-product-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2b2218;
    line-height: 1.25;
}

.dynamic-home-product-model {
    font-size: 0.74rem;
    color: #6d655a;
    margin-top: 2px;
}

.dynamic-home-product-price {
    font-size: 0.82rem;
    color: var(--dynamic-price-color, #b8963a);
    font-weight: 700;
    margin-top: 4px;
}

@media (min-width: 768px) {
    .dynamic-home-section {
        padding: 24px 0;
    }

    .dynamic-home-text-card,
    .dynamic-home-products-wrap {
        padding-left: 24px;
        padding-right: 24px;
    }

    .dynamic-home-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dynamic-home-products-title {
        font-size: 1.8rem;
    }

    .dynamic-featured-layout {
        grid-template-columns: 1fr 1fr;
    }

    .dynamic-featured-side {
        grid-template-columns: repeat(2, 1fr);
    }

    .dynamic-minimal-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- View All Button in dynamic sections --- */
.dynamic-home-products-wrap .section-view-all-btn {
    margin-top: 16px;
}

.dynamic-home-products-wrap .section-view-all-btn:hover {
    background: var(--dynamic-accent-color, #b8963a);
    color: #fff;
    border-color: var(--dynamic-accent-color, #b8963a);
}

/* --- Dynamic Slider Mode (reuses specials-grid) --- */
.dynamic-home-products-section .specials-grid {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.dynamic-home-products-section .specials-grid::-webkit-scrollbar {
    display: none;
}

.dynamic-home-products-section .specials-grid .special-card {
    flex: 0 0 auto;
    width: calc(40vw - 12px);
    max-width: 200px;
    scroll-snap-align: center;
}

.dynamic-home-products-section .specials-grid .special-card-price {
    color: var(--dynamic-price-color, #b8963a);
}

.dynamic-home-products-section .slider-outer {
    padding: 0;
    margin-left: -16px;
    margin-right: -16px;
}

.dynamic-home-products-section .specials-slider-wrapper {
    padding: 0;
    overflow: visible;
}

.dynamic-home-products-section .new-arrivals-slider-wrapper {
    padding: 0;
    overflow: visible;
}

/* --- Dynamic Tilted Mode (reuses new-arrivals-track) --- */
.dynamic-home-products-section .new-arrivals-track .special-card-price {
    color: var(--dynamic-price-color, #b8963a);
}

/* --- Carousel Mode --- */
.dynamic-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 16px;
}

.dynamic-carousel-track {
    position: relative;
    min-height: 200px;
}

.dynamic-carousel-slide {
    display: none;
    animation: dynCarouselFade 0.4s ease;
}

.dynamic-carousel-slide.active {
    display: block;
}

@keyframes dynCarouselFade {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.dynamic-carousel-card {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 0 auto;
}

.dynamic-carousel-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.dynamic-carousel-info {
    padding: 14px 16px;
    text-align: right;
}

.dynamic-carousel-name {
    font-size: 1rem;
    font-weight: 700;
    color: #2b2218;
    line-height: 1.3;
}

.dynamic-carousel-model {
    font-size: 0.82rem;
    color: #6d655a;
    margin-top: 3px;
}

.dynamic-carousel-price {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 6px;
}

.dynamic-carousel-details {
    font-size: 0.8rem;
    color: var(--dynamic-accent-color, #b8963a);
    font-weight: 500;
    margin-top: 4px;
}

.dynamic-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #2b2218;
    transition: background 0.2s;
}

.dynamic-carousel-arrow:hover {
    background: #fff;
}

.dynamic-carousel-prev {
    right: 20px;
}

.dynamic-carousel-next {
    left: 20px;
}

.dynamic-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.dynamic-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4d4d4;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dynamic-carousel-dot.active {
    background: var(--dynamic-accent-color, #b8963a);
    transform: scale(1.25);
}

/* --- Featured Mode --- */
.dynamic-featured-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px;
}

.dynamic-featured-main {
    width: 100%;
}

.dynamic-featured-card {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.dynamic-featured-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.dynamic-featured-info {
    padding: 12px 14px;
    text-align: right;
}

.dynamic-featured-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2b2218;
    line-height: 1.3;
}

.dynamic-featured-model {
    font-size: 0.8rem;
    color: #6d655a;
    margin-top: 3px;
}

.dynamic-featured-price {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 6px;
}

.dynamic-featured-details {
    font-size: 0.78rem;
    color: var(--dynamic-accent-color, #b8963a);
    font-weight: 500;
    margin-top: 4px;
}

.dynamic-featured-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* --- Minimal Mode --- */
.dynamic-minimal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 16px;
}

.dynamic-minimal-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.dynamic-minimal-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dynamic-minimal-card:hover img,
.dynamic-minimal-card:active img {
    transform: scale(1.05);
}

.dynamic-minimal-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.dynamic-minimal-card:hover .dynamic-minimal-overlay,
.dynamic-minimal-card:active .dynamic-minimal-overlay {
    opacity: 1;
}

.dynamic-minimal-name {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* סקשן אירועים - הצצה לכרטיסים הבאים */
#eventsSection .specials-slider-wrapper {
    padding: 0;
    overflow: visible;
}

#eventsSection .container {
    padding: 0;
    max-width: 100%;
}

#eventsSection .events-grid {
    padding: 0 16px;
}

.specials-grid::-webkit-scrollbar {
    display: none;
}

/* סגנון גרירה בלחיצה לסליידרים */
.specials-grid,
.events-grid,
.magnets-track,
.new-arrivals-track,
.bento-track {
    cursor: grab;
}

.specials-grid.slider-dragging,
.events-grid.slider-dragging,
.magnets-track.slider-dragging,
.new-arrivals-track.slider-dragging,
.bento-track.slider-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.specials-grid .special-card {
    scroll-snap-align: center;
}

/* Tablet - 2 כרטיסים */
@media (min-width: 768px) {
    .specials-grid {
        gap: 20px;
        padding: 0 24px;
    }
    
    .special-card {
        width: 300px;
        border-radius: 18px;
        scroll-snap-align: start;
    }
    
    .special-card-name {
        font-size: 0.95rem;
    }
    
    .special-card-price {
        font-size: 1.05rem;
    }

    /* המיוחדים שלנו - גריד כמו אירועים בדסקטופ */
    #specialsSection .container {
        padding: 0 16px;
    }

    #specialsSection .specials-grid {
        display: grid;
        grid-template-columns: repeat(4, calc(25% - 13.5px));
        grid-template-rows: auto;
        grid-auto-flow: column;
        grid-auto-columns: calc(25% - 13.5px);
        gap: 18px;
        padding: 0 4px;
    }

    #specialsSection .specials-grid .special-card {
        width: auto;
        max-width: none;
        scroll-snap-align: start;
    }
}

/* Desktop - 4 כרטיסים */
@media (min-width: 1200px) {
    .specials-section {
        padding: 60px 0;
    }
    
    .specials-slider-wrapper {
        max-width: 1400px;
    }
    
    .specials-grid {
        gap: 24px;
        padding: 0 40px;
        justify-content: center;
    }
    
    .special-card {
        width: 280px;
        border-radius: 20px;
    }
    
    .special-card-overlay {
        padding: 16px;
    }
    
    .special-card-name {
        font-size: 1.1rem;
    }
    
    .special-card-price {
        font-size: 1.2rem;
    }

    #specialsSection .specials-grid {
        grid-template-columns: repeat(4, calc(25% - 18px));
        grid-auto-columns: calc(25% - 18px);
        gap: 24px;
    }
}

.special-card {
    flex: 0 0 auto;
    width: calc(40vw - 12px);
    max-width: 200px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #ffffff;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 6px 6px 0 6px;
}

.special-card::after {
    display: none;
}

.special-card .special-card-media {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.special-card img,
.special-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.special-card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #2b2218;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(200, 168, 106, 0.6);
    z-index: 2;
}

.special-card-overlay {
    position: relative;
    padding: 6px 6px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.special-card-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.special-card-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    color: #2b2218;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    flex: 1;
    min-width: 0;
}

.special-card-model {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    width: 100%;
    line-height: 1.3;
}

.special-card-details {
    font-size: 0.7rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-top: -1px;
    text-align: right;
}

.special-card-price {
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0;
    color: #b8963a;
    white-space: nowrap;
    text-align: right;
}

#eventsSection .special-card-price {
    color: #6a6a6a;
}

#magnetsSection .special-card-price {
    color: #5b7ea6;
}

/* Scroll Indicator */
.specials-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: rgba(43, 34, 24, 0.5);
    font-size: 13px;
}

.specials-scroll-hint i {
    animation: scrollHint 1.5s ease-in-out infinite;
}

/* Section View All Button */
.section-view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 0;
    padding: 12px 28px;
    background: #ffffff;
    color: #b8963a;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid #b8963a;
    box-shadow: none;
    transition: all 0.3s ease;
    width: fit-content;
}

.section-view-all-btn:hover {
    background: #b8963a;
    color: #fff;
}

.section-view-all-btn i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.section-view-all-btn:hover i {
    transform: translateX(-4px);
}

/* Events Section Button - Silver */
#eventsSection .section-view-all-btn {
    color: #888888;
    border-color: #a0a0a0;
}

#eventsSection .section-view-all-btn:hover {
    background: #a0a0a0;
    color: #fff;
}

@keyframes scrollHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-6px); }
}

@media (max-width: 767px) {
    .specials-title {
        margin-bottom: 30px;
    }
    
    .special-card-overlay {
        padding: 8px 8px;
    }
    
    .special-card-name {
        font-size: 0.9rem;
    }
    
    .special-card-price {
        font-size: 1rem;
    }
    
    .specials-scroll-hint {
        margin-top: 16px;
        font-size: 12px;
    }
}
