/**
 * Sadit Elementor Widgets — Frontend Styles
 * © 2024 Sadicom Ltd. All rights reserved.
 */

/* ══════════════════════════════════════════════════════
   PRODUCT SHOWCASE CARD
   ══════════════════════════════════════════════════════ */
.sadit-sc-card {
    position: relative; overflow: hidden; border-radius: 16px;
    min-height: 400px; display: flex; flex-direction: column;
    justify-content: flex-start;
    background: linear-gradient(160deg, #b8d8f0 0%, #d6eeff 50%, #c5e4f8 100%);
}
.sadit-sc-theme-dark { background: #1a1a1a; }
.sadit-sc-theme-dark .sadit-sc-title,
.sadit-sc-theme-dark .sadit-sc-subtitle { color: #fff; }
.sadit-sc-theme-light .sadit-sc-title,
.sadit-sc-theme-light .sadit-sc-subtitle { color: #1D1D21; }

.sadit-sc-content { position: relative; z-index: 2; padding: 40px 40px 20px; text-align: center; }
.sadit-sc-title { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.03em; }
.sadit-sc-title em { font-style: italic; font-weight: 300; }
.sadit-sc-subtitle { font-size: 15px; font-weight: 400; line-height: 1.5; margin: 0 0 20px; opacity: 0.85; }

.sadit-sc-buttons { display: flex; flex-direction: row; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.sadit-sc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 22px; font-size: 14px; font-weight: 500;
    border-radius: 980px; border: 1.5px solid transparent;
    text-decoration: none; cursor: pointer; transition: all 0.25s ease-in-out;
    white-space: nowrap; line-height: 1.4; min-width: 90px;
}
.sadit-sc-btn:hover { opacity: 0.85; transform: scale(1.03); }
.sadit-sc-btn-filled { background: #1a73e8; border-color: #1a73e8; color: #fff !important; }
.sadit-sc-btn-filled:hover { background: #1558b0; border-color: #1558b0; }
.sadit-sc-btn-outline { background: transparent; border-color: currentColor; }
.sadit-sc-btn-outline:hover { background: rgba(0,0,0,.06); }
.sadit-sc-btn-text { background: transparent; border-color: transparent; padding-left: 4px; padding-right: 4px; text-decoration: underline; text-underline-offset: 3px; }

.sadit-sc-image { position: relative; z-index: 1; flex: 1; display: flex; align-items: flex-end; justify-content: center; padding: 0 20px; min-height: 180px; }
.sadit-sc-image img { max-width: 80%; height: auto; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.12)); transition: transform .4s ease; }
.sadit-sc-card:hover .sadit-sc-image img { transform: translateY(-6px); }
.sadit-sc-img-bottom-center .sadit-sc-image { align-items: flex-end; justify-content: center; }
.sadit-sc-img-bottom-right  .sadit-sc-image { align-items: flex-end; justify-content: flex-end; }
.sadit-sc-img-bottom-left   .sadit-sc-image { align-items: flex-end; justify-content: flex-start; }
.sadit-sc-img-center        .sadit-sc-image { align-items: center; justify-content: center; }

.sadit-sc-theme-dark .sadit-sc-btn-outline { border-color: rgba(255,255,255,.7); color: #fff !important; }
.sadit-sc-theme-dark .sadit-sc-btn-outline:hover { background: rgba(255,255,255,.1); }

@media (max-width: 768px) {
    .sadit-sc-card { min-height: 300px; }
    .sadit-sc-content { padding: 28px 24px 16px; }
    .sadit-sc-title { font-size: 22px; }
    .sadit-sc-subtitle { font-size: 14px; }
    .sadit-sc-image { min-height: 140px; padding: 0 12px; }
    .sadit-sc-image img { max-width: 90%; }
}

/* ══════════════════════════════════════════════════════
   TWO-COLUMN SHOWCASE LAYOUT
   ══════════════════════════════════════════════════════ */
.elementor-col-50 .sadit-sc-card,
.elementor-column[data-col="50"] .sadit-sc-card { height: 100%; }
.elementor-row:has(.sadit-sc-card) { align-items: stretch; }
.elementor-row:has(.sadit-sc-card) > .elementor-column { display: flex; flex-direction: column; }
.elementor-row:has(.sadit-sc-card) > .elementor-column > .elementor-column-wrap { flex: 1; display: flex; flex-direction: column; }
.elementor-row:has(.sadit-sc-card) > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap { flex: 1; }
.elementor-row:has(.sadit-sc-card) .elementor-widget-container { height: 100%; }
.elementor-row:has(.sadit-sc-card) .elementor-widget-sadit_product_showcase { height: 100%; }

/* ══════════════════════════════════════════════════════
   PROMO BANNER
   ══════════════════════════════════════════════════════ */
.sadit-promo-banner { overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, #1a73e8, #1558b0); }
.sadit-promo-inner { padding: 50px 60px; text-align: center; }
.sadit-promo-badge { display: inline-block; background: rgba(255,255,255,.2); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 4px 12px; border-radius: 980px; margin-bottom: 14px; }
.sadit-promo-title { font-size: 36px; font-weight: 700; color: #fff; margin: 0 0 10px; line-height: 1.2; }
.sadit-promo-description { font-size: 16px; color: rgba(255,255,255,.85); margin: 0 0 24px; }
.sadit-promo-btn { display: inline-flex; align-items: center; padding: 12px 32px; font-size: 15px; font-weight: 600; border-radius: 980px; text-decoration: none; transition: all .25s ease; background: #fff; color: #1a73e8; }
.sadit-promo-btn:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
@media (max-width: 768px) { .sadit-promo-inner { padding: 36px 24px; } .sadit-promo-title { font-size: 26px; } }

/* ══════════════════════════════════════════════════════
   HERO SLIDER
   ══════════════════════════════════════════════════════ */

/* Wrapper — height set by Elementor control on .sadit-hs-wrapper */
.sadit-hs-wrapper {
    --sadit-hs-tr: 700ms;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 90vh;           /* fallback for older browsers */
    height: 90svh;          /* svh = small viewport height — excludes mobile browser chrome */
    min-height: 320px;
    margin: 0;
}

/* Track fills wrapper */
.sadit-hs-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* All slides stack absolutely inside the wrapper */
.sadit-hs-slide {
    position: absolute !important;
    inset: 0 !important;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    /* No default background — each slide uses its own Elementor background.
       Set a neutral dark so slides without a configured background don't look broken. */
    background: #111;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--sadit-hs-tr, 700ms) ease;
    z-index: 1;
}
.sadit-hs-slide:first-child { position: absolute !important; }

/* Active / transition states */
.sadit-hs-slide.sadit-hs-active  { opacity: 1; pointer-events: auto; z-index: 2; }
.sadit-hs-slide.sadit-hs-leaving  { opacity: 0; z-index: 3; }
.sadit-hs-slide.sadit-hs-entering { opacity: 0; z-index: 2; }

/* Overlay */
.sadit-hs-overlay { position: absolute; inset: 0; background: transparent; z-index: 1; pointer-events: none; }

/* Content block */
.sadit-hs-content {
    position: relative; z-index: 3;
    width: 100%; max-width: 760px;
    margin: 0 auto; padding: 70px 30px 30px;
    text-align: center;
}
.sadit-hs-vert-top    .sadit-hs-content { padding-top: 70px; }
.sadit-hs-vert-middle .sadit-hs-slide   { justify-content: center; }
.sadit-hs-vert-middle .sadit-hs-content { padding-top: 40px; }
.sadit-hs-vert-bottom .sadit-hs-content { padding-top: 40px; margin-top: auto; }

/* Title */
.sadit-hs-title { font-size: clamp(42px, 6vw, 72px); font-weight: 700; color: #fff; margin: 0 0 12px; line-height: 1.05; letter-spacing: -0.03em; }
.sadit-hs-title em { font-style: italic; font-weight: 300; }

/* Subtitle */
.sadit-hs-subtitle { font-size: clamp(16px, 2.2vw, 22px); font-weight: 400; color: rgba(255,255,255,.85); margin: 0 0 28px; line-height: 1.4; }

/* Buttons */
.sadit-hs-buttons { display: flex; flex-direction: row; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.sadit-hs-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 26px; font-size: 15px; font-weight: 500; border-radius: 980px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: all .25s ease; white-space: nowrap; line-height: 1.4; }
.sadit-hs-btn:hover { transform: scale(1.04); text-decoration: none; }
.sadit-hs-btn-filled, .sadit-hs-btn-primary { background: #1a73e8; border-color: #1a73e8; color: #fff !important; }
.sadit-hs-btn-filled:hover, .sadit-hs-btn-primary:hover { background: #1558b0; border-color: #1558b0; }
.sadit-hs-btn-text, .sadit-hs-btn-secondary { background: transparent; border-color: transparent; color: #fff !important; }
.sadit-hs-btn-outline { background: transparent; border-color: rgba(255,255,255,.6); color: #fff !important; }
.sadit-hs-btn-outline:hover { background: rgba(255,255,255,.1); }

/* Link row */
.sadit-hs-link-row { margin-top: 4px; }
.sadit-hs-link { font-size: 14px; font-weight: 400; color: #a78bfa; text-decoration: none; transition: opacity .2s; }
.sadit-hs-link:hover { opacity: .75; text-decoration: underline; text-underline-offset: 3px; }

/* Product image — fills remaining slide height, rises from bottom on load */
.sadit-hs-image {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 200px;
    overflow: visible; /* allow image to show fully */
    padding-bottom: 0;
}
.sadit-hs-image img {
    display: block;
    max-width: 55%;
    width: auto;
    height: auto;
    /* Use a sensible max-height in px — avoid % which fails in flex on some mobile browsers */
    max-height: 420px;
    object-fit: contain;
    object-position: bottom center;
    animation: sadit-hs-img-rise .9s cubic-bezier(.22,1,.36,1) both;
}
.sadit-hs-slide.sadit-hs-leaving  .sadit-hs-image img { animation: none; }
.sadit-hs-slide.sadit-hs-entering .sadit-hs-image img { animation: sadit-hs-img-rise .9s cubic-bezier(.22,1,.36,1) both; }

@keyframes sadit-hs-img-rise {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Arrows */
.sadit-hs-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(255,255,255,.12); border: none; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; transition: background .2s; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.sadit-hs-arrow:hover { background: rgba(255,255,255,.28); }
.sadit-hs-prev { left: 20px; }
.sadit-hs-next { right: 20px; }

/* Dots */
.sadit-hs-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 8px; align-items: center; }
.sadit-hs-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; transition: all .25s; }
.sadit-hs-dot-active { background: #fff; width: 24px; border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .sadit-hs-content { padding: 36px 20px 16px; }
    .sadit-hs-title { font-size: 32px; }
    .sadit-hs-subtitle { font-size: 15px; }
    .sadit-hs-btn { padding: 9px 20px; font-size: 14px; }
    .sadit-hs-arrow { width: 36px; height: 36px; font-size: 20px; }
    .sadit-hs-image { min-height: 160px; }
    .sadit-hs-image img { max-width: 75%; max-height: 280px; }
}
@media (max-width: 480px) {
    .sadit-hs-content { padding: 28px 16px 12px; }
    .sadit-hs-title { font-size: 26px; }
    .sadit-hs-buttons { flex-direction: column; gap: 10px; }
    .sadit-hs-image { min-height: 140px; }
    .sadit-hs-image img { max-width: 85%; max-height: 220px; }
}

/* ══════════════════════════════════════════════════════
   PRODUCTS GRID WIDGET
   ══════════════════════════════════════════════════════ */

/* Section header */
.sadit-pg-wrapper { width: 100%; }
.sadit-pg-header {
    display: flex; align-items: baseline;
    justify-content: space-between; gap: 16px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.sadit-pg-heading {
    font-size: 22px; font-weight: 700;
    color: #1D1D21; margin: 0; letter-spacing: -.02em;
}
.sadit-pg-view-all {
    font-size: 14px; font-weight: 500;
    color: #1a73e8; text-decoration: none;
    white-space: nowrap; transition: opacity .2s;
}
.sadit-pg-view-all:hover { opacity: .75; }

/* Grid */
.sadit-pg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none; padding: 0; margin: 0;
}

/* ── Card base ── */
.sadit-pg-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}
.sadit-pg-card:hover { transform: translateY(-4px); }

/* ── Card style variants ── */
.sadit-pg-style-classic  .sadit-pg-card { box-shadow: 0 2px 12px rgba(0,0,0,.07); border: 1px solid #e6e9ec; }
.sadit-pg-style-classic  .sadit-pg-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.12); }
.sadit-pg-style-minimal  .sadit-pg-card { box-shadow: none; border: none; background: transparent; }
.sadit-pg-style-minimal  .sadit-pg-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); background: #fff; }
.sadit-pg-style-bordered .sadit-pg-card { border: 2px solid #e6e9ec; box-shadow: none; }
.sadit-pg-style-bordered .sadit-pg-card:hover { border-color: #1a73e8; box-shadow: none; }
.sadit-pg-style-overlay  .sadit-pg-card { box-shadow: 0 2px 12px rgba(0,0,0,.07); border: 1px solid #e6e9ec; }

/* ── Image ── */
.sadit-pg-img-link { display: block; text-decoration: none; }
.sadit-pg-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
}
.sadit-pg-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .4s ease;
}
.sadit-pg-card:hover .sadit-pg-img-wrap img { transform: scale(1.04); }

/* Overlay (style = overlay) */
.sadit-pg-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.38);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s ease;
}
.sadit-pg-card:hover .sadit-pg-overlay { opacity: 1; }
.sadit-pg-atc-overlay {
    transform: translateY(12px);
    transition: transform .3s ease, opacity .3s ease;
    opacity: 0;
}
.sadit-pg-card:hover .sadit-pg-atc-overlay { transform: translateY(0); opacity: 1; }

/* ── Badges ── */
.sadit-pg-badges {
    position: absolute; top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 4px;
    z-index: 3;
}
.sadit-pg-badge {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: .04em;
    color: #fff; line-height: 1.5;
}
.sadit-pg-badge-sale     { background: #43C143; }
.sadit-pg-badge-new      { background: #1a73e8; }
.sadit-pg-badge-featured { background: #f59e0b; }

/* ── Card body ── */
.sadit-pg-body {
    padding: 12px 14px 14px;
    display: flex; flex-direction: column; gap: 6px;
    flex: 1;
}

/* Title */
.sadit-pg-title-link { text-decoration: none; }
.sadit-pg-title {
    font-size: 13px; font-weight: 600;
    color: #1D1D21; margin: 0; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.sadit-pg-title-link:hover .sadit-pg-title { color: #1a73e8; }

/* Rating */
.sadit-pg-rating { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.sadit-pg-star { color: #d1d5db; }
.sadit-pg-star.filled { color: #f59e0b; }
.sadit-pg-rating-count { font-size: 11px; color: #9ca3af; margin-left: 4px; }

/* Price */
.sadit-pg-price {
    font-size: 15px; font-weight: 700; color: #1a73e8;
    margin: 0; line-height: 1.2;
}
.sadit-pg-price del { color: #bbb; font-size: 12px; font-weight: 400; margin-right: 4px; }
.sadit-pg-price ins { text-decoration: none; }

/* ATC button */
.sadit-pg-atc {
    display: flex; align-items: center; justify-content: center;
    padding: 9px 14px; margin-top: auto;
    font-size: 12px; font-weight: 600;
    text-decoration: none; text-align: center;
    border: 1.5px solid transparent;
    cursor: pointer; transition: all .2s ease;
    line-height: 1.3; width: 100%;
}
.sadit-pg-btn-filled  { background: #1a73e8; border-color: #1a73e8; color: #fff !important; border-radius: 6px; }
.sadit-pg-btn-filled:hover  { background: #1558b0; border-color: #1558b0; }
.sadit-pg-btn-outline { background: transparent; color: #1a73e8 !important; border-color: #1a73e8; border-radius: 6px; }
.sadit-pg-btn-outline:hover { background: #1a73e8; color: #fff !important; }
.sadit-pg-btn-pill    { background: #1a73e8; border-color: #1a73e8; color: #fff !important; border-radius: 980px; }
.sadit-pg-btn-pill:hover { background: #1558b0; }
.sadit-pg-btn-ghost   { background: transparent; border-color: transparent; color: #1a73e8 !important; padding-left: 0; padding-right: 0; }
.sadit-pg-btn-ghost:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .sadit-pg-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .sadit-pg-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .sadit-pg-body { padding: 10px 10px 12px; }
    .sadit-pg-title { font-size: 12px; }
    .sadit-pg-price { font-size: 13px; }
    .sadit-pg-atc { font-size: 11px; padding: 8px 10px; }
}
@media (max-width: 480px) {
    .sadit-pg-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
