/* ==========================================================================
   GOLDEN WOO THEME HELPER - SHORTCODES STYLING
   ========================================================================== */

.gwt-sec-wrapper {
    width: 100%;
    margin-bottom: 40px;
}

/* 1. Category Showcase Grid & Slider */
.gwt-categories-carousel {
    overflow-x: auto;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
}

.gwt-categories-carousel.gwt-wrap-active {
    overflow-x: visible !important;
    width: 100% !important;
}

.gwt-categories-carousel::-webkit-scrollbar {
    height: 6px;
}

.gwt-categories-carousel::-webkit-scrollbar-thumb {
    background-color: var(--gwt-border-color);
    border-radius: 3px;
}

.gwt-categories-track {
    display: flex;
    gap: clamp(14px, 3vw, 30px);
    padding: 0 10px;
    /* NOT justify-content:center — inside an overflow-x:auto parent that clips
       the first items and makes them unreachable by scrolling. `margin:auto`
       on the track centres it when it fits and starts at the edge when it
       does not. */
    justify-content: flex-start;
    margin-inline: auto;
    width: max-content;
    max-width: 100%;
}
@media (min-width: 993px) {
    .gwt-categories-track { justify-content: center; width: auto; }
}

.gwt-categories-track.gwt-wrap-enabled {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px;
    width: 100%;
}

.gwt-categories-track.gwt-wrap-enabled .gwt-category-card {
    flex: 0 0 calc((100% / var(--gwt-cat-cols, 5)) - 25px) !important;
    max-width: calc((100% / var(--gwt-cat-cols, 5)) - 25px) !important;
}

@media (max-width: 1024px) {
    .gwt-categories-track.gwt-wrap-enabled .gwt-category-card {
        flex: 0 0 calc(33.333% - 20px) !important;
        max-width: calc(33.333% - 20px) !important;
    }
}

@media (max-width: 768px) {
    .gwt-categories-track.gwt-wrap-enabled .gwt-category-card {
        flex: 0 0 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
    }
}

@media (max-width: 480px) {
    /* Was flex:0 0 100% here — a single full-width column, which is the
       tall vertical stack in the bug report. Phones now match the rest of
       the theme's 2-column grid instead of a special-cased single column. */
    .gwt-categories-track.gwt-wrap-enabled { gap: 16px; }
    .gwt-categories-track.gwt-wrap-enabled .gwt-category-card {
        flex: 0 0 calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
    }
}

.gwt-category-card {
    flex: 0 0 clamp(112px, 30vw, 180px);
    text-align: center;
    position: relative;
    transition: var(--gwt-transition);
    /* Room for the rotated decorative panel so it is not clipped */
    padding-inline: 6px;
}
@media (hover: none) {
    /* Straighten the tiles on touch devices — there is no hover to fix them */
    .gwt-category-card .gwt-cat-img-wrapper { transform: rotate(-4deg); }
    .gwt-category-card .gwt-cat-bg-skew { transform: rotate(8deg); }
}

.gwt-category-card:hover {
    transform: translateY(-8px);
}

.gwt-category-card a {
    display: block;
    color: var(--gwt-text-color);
}

.gwt-cat-img-wrapper {
    position: relative;
    /* --gwt-cat-size comes from the "حجم كارت القسم" Customizer field
       (functions.php), default 230px. clamp() shrinks it fluidly as the
       viewport narrows, and the tablet/mobile breakpoints below override it
       with their own explicit customizer-driven sizes. */
    width: clamp(96px, 26vw, var(--gwt-cat-size, 230px));
    height: clamp(96px, 26vw, var(--gwt-cat-size, 230px));
    margin: 0 auto clamp(12px, 3vw, 20px);
    z-index: 1;
    transform: rotate(-7deg); /* Crooked by default */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (max-width: 768px) {
    .gwt-cat-img-wrapper {
        width: var(--gwt-cat-size-tablet, 150px);
        height: var(--gwt-cat-size-tablet, 150px);
    }
}

@media (max-width: 480px) {
    .gwt-cat-img-wrapper {
        width: var(--gwt-cat-size-mobile, 120px);
        height: var(--gwt-cat-size-mobile, 120px);
    }
}

.gwt-cat-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: clamp(8px, 2.5vw, 15px);
    box-shadow: 0 4px 12px var(--gwt-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gwt-category-card:hover .gwt-cat-img-wrapper {
    transform: rotate(0deg) scale(1.08); /* Straightens on hover and scales up */
}

.gwt-category-card:hover .gwt-cat-img-wrapper img {
    box-shadow: 0 8px 24px var(--gwt-shadow-hover);
}

.gwt-cat-bg-skew {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--gwt-bg-tint);
    border: 1px solid var(--gwt-border-color);
    border-radius: 16px;
    transform: rotate(14deg); /* Skewed in opposite direction */
    z-index: -1;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gwt-category-card:hover .gwt-cat-bg-skew {
    transform: rotate(0deg);
}

.gwt-cat-title {
    font-size: clamp(12px, 3vw, 16px);
    font-weight: 700;
    margin-top: 10px;
    line-height: 1.4;
}

/* 2. Product Card Showcase */
.gwt-prod-card {
    background-color: #ffffff;
    border: 1px solid var(--gwt-border-color);
    border-radius: var(--gwt-border-radius-card);
    padding: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--gwt-shadow);
    transition: var(--gwt-transition);
    display: flex;
    flex-direction: column;
}

.gwt-prod-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px var(--gwt-shadow-hover);
}

.gwt-prod-onsale {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--gwt-secondary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 3;
}

.gwt-prod-img-link {
    display: block;
    width: 100%;
    /* aspect-ratio instead of a hard 220px, so the image scales with the card
       on a 2-column phone grid instead of squashing */
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--gwt-bg-tint);
    margin-bottom: 16px;
}

.gwt-prod-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--gwt-transition);
}

.gwt-prod-card:hover .gwt-prod-img-link img {
    transform: scale(1.08);
}

.gwt-prod-details {
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gwt-prod-title {
    font-size: clamp(13px, 3.2vw, 15px);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    /* min-height, not a fixed height — a fixed 42px clipped the second line
       at smaller font sizes */
    min-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gwt-prod-title a {
    color: var(--gwt-text-color);
}

.gwt-prod-title a:hover {
    color: var(--gwt-primary);
}

.gwt-prod-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--gwt-muted-color);
    margin-bottom: 16px;
}

.gwt-prod-rating i.active {
    color: #f2a900;
}

.gwt-prod-meta-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-top: 1px dashed var(--gwt-border-color);
    padding-top: 12px;
}

/* On a 2-column phone grid the price and the button cannot sit side by side */
@media (max-width: 600px) {
    .gwt-prod-card { padding: 10px; border-radius: 18px 8px 18px 8px; }
    .gwt-prod-meta-footer { flex-direction: column; align-items: stretch; gap: 10px; }
    .gwt-prod-price-badge { flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: wrap; }
    .gwt-buy-btn { width: 100%; }
    .gwt-prod-rating { margin-bottom: 10px; }
}

.gwt-prod-price-badge {
    display: flex;
    flex-direction: column;
}

.gwt-prod-price-badge .gwt-badge-label {
    font-size: 11px;
    color: var(--gwt-muted-color);
}

.gwt-buy-btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
    min-height: 42px;
    white-space: nowrap;
}

/* 3. Products Tabs */
.gwt-tabs-container {
    width: 100%;
}

.gwt-tabs-triggers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: clamp(22px, 5vw, 40px);
    flex-wrap: wrap;
    padding-inline: var(--gwt-gutter, 16px);
}

@media (max-width: 600px) {
    .gwt-tabs-triggers {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .gwt-tabs-triggers::-webkit-scrollbar { display: none; }
    .gwt-tab-trigger { flex: 0 0 auto; white-space: nowrap; padding: 9px 18px; font-size: 14px; }
}

.gwt-tab-trigger {
    background: none;
    min-height: 44px;
    border: 2px solid var(--gwt-primary);
    color: var(--gwt-primary);
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--gwt-transition);
}

.gwt-tab-trigger.active, .gwt-tab-trigger:hover {
    background-color: var(--gwt-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--gwt-shadow);
}

.gwt-tab-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gwt-tab-panel.active {
    display: block;
    opacity: 1;
}

/* 4. Promotional CTA Banner */
.gwt-promo-banner {
    border-radius: 24px;
    padding: 48px 60px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 992px) {
    .gwt-promo-banner {
        flex-direction: column;
        padding: clamp(24px, 5vw, 40px);
        text-align: center;
        gap: 24px;
        border-radius: 20px;
    }
    .gwt-banner-content { max-width: 100%; }
}

.gwt-banner-content {
    max-width: 60%;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .gwt-banner-content {
        max-width: 100%;
    }
}

.gwt-banner-title {
    font-size: clamp(22px, 5vw, 38px);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.35;
}

.gwt-banner-text {
    font-size: clamp(13px, 3.2vw, 16px);
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.7;
}

.gwt-banner-btn {
    border-radius: var(--gwt-border-radius);
    padding: 12px 28px;
}

.gwt-banner-marquee {
    position: relative;
    /* was a hard 440x480 px — wider than a phone viewport, which pushed the
       whole page sideways because .gwt-hide-mobile had no CSS rule */
    width: min(440px, 46%);
    max-width: 440px;
    height: clamp(320px, 42vw, 480px);
    overflow: hidden;
    z-index: 2;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .gwt-banner-marquee { display: none; }
}

.gwt-marquee-columns-wrapper {
    display: flex;
    gap: 16px;
    height: 100%;
    width: 100%;
}

.gwt-marquee-column {
    width: calc(50% - 8px);
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

/* Mask top and bottom for smooth fade overlay */
.gwt-marquee-column::before, .gwt-marquee-column::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 10;
    pointer-events: none;
}

.gwt-marquee-column::before {
    top: 0;
    background: linear-gradient(to bottom, var(--gwt-primary), transparent);
}

.gwt-marquee-column::after {
    bottom: 0;
    background: linear-gradient(to top, var(--gwt-primary), transparent);
}

.gwt-marquee-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Define Marquee Keyframes for UP and DOWN directions */
@keyframes gwt-marquee-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes gwt-marquee-down {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

.gwt-marquee-column[data-direction="up"] .gwt-marquee-track {
    animation: gwt-marquee-up 18s linear infinite;
}

.gwt-marquee-column[data-direction="down"] .gwt-marquee-track {
    animation: gwt-marquee-down 18s linear infinite;
}

/* Hover pauses the animations */
.gwt-banner-marquee:hover .gwt-marquee-track {
    animation-play-state: paused;
}

.gwt-marquee-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    width: 100%;
}

.gwt-marquee-card:hover {
    transform: scale(1.03);
}

.gwt-marquee-card a {
    display: block;
    color: var(--gwt-text-color);
}

.gwt-marquee-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
}

.gwt-marquee-card-info h4 {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.gwt-marquee-card-info span {
    font-size: 14px;
    font-weight: 800;
    color: var(--gwt-primary);
}

/* 5. Statistics Counters */
.gwt-stats-grid {
    margin-top: 40px;
}

.gwt-stat-card {
    background-color: #ffffff;
    border: 1px solid var(--gwt-border-color);
    border-radius: var(--gwt-border-radius);
    padding: clamp(14px, 3vw, 24px);
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 20px);
    box-shadow: 0 4px 10px var(--gwt-shadow);
    min-width: 0;
}

@media (max-width: 600px) {
    .gwt-stat-card { flex-direction: column; text-align: center; gap: 10px; }
}

.gwt-stat-icon-wrapper {
    width: clamp(44px, 11vw, 64px);
    height: clamp(44px, 11vw, 64px);
    border-radius: 50%;
    background-color: var(--gwt-bg-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gwt-primary);
    font-size: 24px;
    flex-shrink: 0;
}

.gwt-stat-number {
    font-size: clamp(19px, 4.4vw, 28px);
    line-height: 1.2;
    font-weight: 800;
    color: var(--gwt-text-color);
}

.gwt-stat-label {
    font-size: clamp(11px, 2.8vw, 13px);
    color: var(--gwt-muted-color);
}

/* 6. FAQ Accordion */
.gwt-faqs-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .gwt-faqs-layout {
        grid-template-columns: 1fr;
    }
}

.gwt-faqs-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gwt-faq-item {
    border-bottom: 1px solid var(--gwt-border-color);
    padding-bottom: 15px;
}

.gwt-faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 4px;
    /* logical, so LTR installs are not forced into right alignment */
    text-align: start;
    display: flex;
    gap: 12px;
    min-height: 48px;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--gwt-text-color);
    cursor: pointer;
    transition: var(--gwt-transition);
}

.gwt-faq-question:hover {
    color: var(--gwt-primary);
}

.gwt-faq-question span { flex: 1 1 auto; min-width: 0; }
.gwt-faq-question i { flex-shrink: 0; }

@media (max-width: 600px) {
    .gwt-faq-question { font-size: 14px; }
    .gwt-faqs-ad-box { padding: 26px; min-height: 220px; }
    .gwt-faqs-ad-content h3 { font-size: 19px; }
    .gwt-faqs-ad-content p { font-size: 14px; }
}

.gwt-faq-question i {
    transition: transform 0.3s ease;
}

.gwt-faq-question.active i {
    transform: rotate(180deg);
}

.gwt-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.gwt-faq-answer-content {
    padding: 12px;
    font-size: 14px;
    color: var(--gwt-muted-color);
    line-height: 1.8;
}

.gwt-faqs-ad-box {
    border-radius: 24px;
    background-color: var(--gwt-primary);
    background-size: cover;
    background-position: center;
    padding: 40px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.gwt-faqs-ad-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(246, 243, 237, 0) 0%, var(--gwt-primary-dark) 100%);
    z-index: 1;
}

.gwt-faqs-ad-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.gwt-faqs-ad-content h3 {
    font-size: 24px;
    font-weight: 800;
}

.gwt-faqs-ad-content p {
    font-size: 15px;
    opacity: 0.9;
}

/* 7. Store Features Grid */
.gwt-feature-card {
    background-color: #ffffff;
    border: 1px solid var(--gwt-border-color);
    border-radius: var(--gwt-border-radius);
    padding: clamp(18px, 4vw, 30px) clamp(12px, 3vw, 20px);
    text-align: center;
    box-shadow: 0 4px 10px var(--gwt-shadow);
    transition: var(--gwt-transition);
}

.gwt-feature-card:hover {
    transform: translateY(-5px);
    background-color: var(--gwt-bg-tint);
}

.gwt-feat-icon-wrapper {
    width: clamp(48px, 12vw, 64px);
    height: clamp(48px, 12vw, 64px);
    border-radius: 50%;
    background-color: var(--gwt-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.gwt-feat-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.gwt-feat-desc {
    font-size: 13px;
    color: var(--gwt-muted-color);
    line-height: 1.6;
}

/* 8. Testimonials Grid */
.gwt-testimonial-card {
    background-color: var(--gwt-bg-tint);
    border-radius: 24px;
    padding: clamp(18px, 4vw, 30px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gwt-quote-icon {
    font-size: 32px;
    color: var(--gwt-primary);
    opacity: 0.2;
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
}

.gwt-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f2a900;
    font-size: 12px;
}

.gwt-stars span {
    font-size: 12px;
    color: var(--gwt-muted-color);
    margin-inline-start: 4px;
}

.gwt-testimonial-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gwt-text-color);
}

.gwt-testimonial-author {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--gwt-border-color);
    padding-top: 16px;
}

.gwt-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--gwt-muted-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.gwt-author-meta h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.gwt-author-meta span {
    font-size: 12px;
    color: var(--gwt-muted-color);
}

/* ==========================================================================
   MAIN IMAGE SLIDER  (rebuilt for mobile)
   ========================================================================== */
.gwt-main-slider-container {
    position: relative;
    width: 100%;
    /* aspect-ratio driven by the "إعدادات سلايدر الصور الرئيسي" Customizer
       fields, so it can be tuned per banner instead of guessing at a single
       fixed ratio in CSS that never fits every image. */
    aspect-ratio: var(--gwt-slider-ratio-desktop, 16/9);
    max-height: 620px;
    overflow: hidden;
    background: var(--gwt-bg-tint, #f4f7f7);
    touch-action: pan-y;
}

.gwt-main-slider { position: relative; width: 100%; height: 100%; }

/* Slides are stacked and cross-faded rather than display:none/block, so the
   container never collapses mid-transition. */
.gwt-main-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.gwt-main-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}
.gwt-main-slide a { display: block; width: 100%; height: 100%; }
.gwt-main-slide picture { display: block; width: 100%; height: 100%; }
.gwt-main-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* Transitions */
@keyframes gwtSlideLeft { from { transform: translateX(6%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes gwtSlideUp   { from { transform: translateY(6%);  opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes gwtZoomFade  { from { transform: scale(1.06); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes gwtFadeIn    { from { opacity: 0; } to { opacity: 1; } }

.gwt-anim-slide-left { animation: gwtSlideLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.gwt-anim-slide-up   { animation: gwtSlideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.gwt-anim-zoom-fade  { animation: gwtZoomFade 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
/* The old blur filter forced a full-frame GPU repaint every 5s and stuttered
   badly on mid-range Android. Replaced with a plain fade. */
.gwt-anim-fade-blur  { animation: gwtFadeIn 0.7s ease forwards; }

/* Controls */
.gwt-slider-prev, .gwt-slider-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    transition: background 0.3s;
    user-select: none;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}
.gwt-slider-prev:hover, .gwt-slider-next:hover { background: var(--gwt-primary); }

/* Logical placement: "previous" always sits at the start edge of the reading
   direction, so the arrows are correct in both Arabic and English. */
.gwt-slider-prev { inset-inline-start: 16px; }
.gwt-slider-next { inset-inline-end: 16px; }

.gwt-slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.22);
}
.gwt-slider-dot {
    cursor: pointer;
    height: 8px; width: 8px;
    background-color: rgba(255, 255, 255, 0.55);
    border: none;
    border-radius: 50%;
    padding: 0;
    transition: width 0.3s, background-color 0.3s;
    -webkit-tap-highlight-color: transparent;
}
.gwt-slider-dot.active, .gwt-slider-dot:hover { background-color: #fff; width: 22px; border-radius: 4px; }

@media (max-width: 768px) {
    .gwt-main-slider-container { aspect-ratio: var(--gwt-slider-ratio-tablet, 16/9); }
    .gwt-slider-prev, .gwt-slider-next { width: 36px; height: 36px; font-size: 14px; }
    .gwt-slider-prev { inset-inline-start: 8px; }
    .gwt-slider-next { inset-inline-end: 8px; }
}

@media (max-width: 480px) {
    /* Taller ratio on phones so a wide banner keeps more of its content
       visible instead of being cropped to a thin strip — and if a dedicated
       mobile image was uploaded, this is the ratio it will actually be
       cropped/composed for. */
    .gwt-main-slider-container { aspect-ratio: var(--gwt-slider-ratio-mobile, 16/9); }
    .gwt-slider-dots { bottom: 10px; }
    /* Arrows are redundant once swiping works — dots stay as the affordance */
    .gwt-slider-prev, .gwt-slider-next { display: none; }
}

/* Real per-device images are now handled with <picture>/<source> in
   front-page.php, driven by the optional "صورة الشريحة للجوال" field. */

/* ==========================================================================
   SHARED SMALL-SCREEN CORRECTIONS
   ========================================================================== */
.gwt-sec-wrapper { margin-bottom: clamp(20px, 4vw, 40px); }

@media (max-width: 992px) {
    .gwt-faqs-layout { gap: 24px; }
}

/* Anything absolutely positioned in a card must not create a scroll bar */
.gwt-sec-wrapper, .gwt-promo-banner, .gwt-testimonial-card { max-width: 100%; }
