.sd-hero { --sd-hero-gutter: 16px; --sd-hero-padding-y: 16px; padding: var(--sd-hero-padding-y) 0; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.sd-hero-container { max-width: calc(100vw - (var(--sd-hero-gutter) * 2)); margin: 0 auto; padding: 0 var(--sd-hero-gutter); }

.sd-hero-slider { position: relative; }
.sd-hero-heading-bar { display: none; }

.sd-hero-track { position: relative; overflow: hidden; aspect-ratio: 1400 / 520; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.sd-hero-slide {
    position: absolute;
    inset: 0;
    height: 100%;
    background-color: transparent; /* avoid grey letterboxing when using contain */
    border-radius: 20px; /* clip nicely with track */
    opacity: 0;
    transform: none; /* disable zoom effect */
    transition: opacity 900ms ease; /* fade only */
    will-change: opacity, transform;
    pointer-events: none; /* avoid clicks on hidden slide */
    margin: 0; /* extend near edges inside container */
    background-position: center center; /* support admin images */
    background-size: contain; /* show full image without cropping/zoom */
    background-repeat: no-repeat;
}

.sd-hero-content {
    position: absolute;
    left: clamp(36px, 7vw, 72px);
    top: 50%;
    transform: translateY(-50%);
    max-width: min(540px, 44vw);
    color: #253D4E;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd-hero-heading {
    margin: 0;
    font-size: clamp(22px, 3.2vw, 40px);
    line-height: 1.1;
    font-weight: 800;
}

.sd-hero-text {
    margin: 0;
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.6;
    color: #4e6b7c;
}

.sd-hero-actions { margin: 0; }
.sd-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #154681;
    color: #fff;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 6px 16px rgba(21,70,129,0.25);
}
.sd-hero-cta:hover { background:#0f3564; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(21,70,129,0.30); }
.sd-cta-icon { width: 18px; height: 18px; }

.sd-hero-slide.is-active { opacity: 1; pointer-events: auto; }

.sd-hero-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; margin-top: 0; }

.sd-hero-dot { width: 15px; height: 15px; border-radius: 30px; border: 1px solid #253D4E; padding: 0; font-size: 0; background: transparent; transition: all 0.3s linear; cursor: pointer; }

.sd-hero-dot.is-active { background: #154681; border-color: #154681; }

/* Arrows */
.sd-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 50px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: #ffffff; /* clear white arrow */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    z-index: 2;
}
.sd-hero-arrow--prev { left: 28px; }
.sd-hero-arrow--next { right: 28px; }
/* keep static color on hover/click for consistency */
.sd-hero-arrow:hover, .sd-hero-arrow:active, .sd-hero-arrow:focus { background: #154681; color: #ffffff; }
.sd-hero-arrow svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
    /* Make above-the-fold tighter so heading is visible on load */
    .sd-hero { --sd-hero-gutter: 8px; --sd-hero-padding-y: 10px; }
    /* Make slider square and full-width on mobile */
    .sd-hero-track { aspect-ratio: 1 / 1; border-radius: 12px; width: 100%; }
    /* Place content at the top inside the slide; show only heading */
    .sd-hero-content { display: flex; left: 12px; right: 12px; top: 10px; transform: none; max-width: none; gap: 6px; }
    .sd-hero-text, .sd-hero-actions { display: none; }
    .sd-hero-content { left: 14px; right: 14px; max-width: none; gap: 8px; }
    .sd-hero-cta { padding: 10px 14px; border-radius: 10px; }
    .sd-hero-dots { bottom: 10px; }
    .sd-hero-arrow { width: 36px; height: 36px; }
    /* Reduce side padding so slider is nearer to screen edges */
    .sd-hero-container { padding: 0 6px; max-width: calc(100vw - 12px); }
    .sd-hero-arrow--prev { left: 12px; }
    .sd-hero-arrow--next { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .sd-hero-slide { transition: none; }
}

/* Product Categories */
.sd-product-categories { padding: 24px 0 8px; }
.sd-pcat-container { max-width: min(1400px, calc(100vw - 32px)); margin: 0 auto; padding: 0 16px; }
.sd-pcat-heading { font-size: 28px; font-weight: 800; color: #253D4E; margin: 8px 0 18px; }
.sd-pcat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.sd-pcat-card { background: #fdf6f0; border-radius: 14px; padding: 18px; box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.sd-pcat-card:nth-child(2) { background: #f3f8ff; }
.sd-pcat-card:nth-child(3) { background: #fff3e9; }
.sd-pcat-card:nth-child(4) { background: #f3f8ff; }
.sd-pcat-media { display:flex; align-items:center; justify-content:center; height: 170px; }
.sd-pcat-media img { max-height: 160px; width: auto; height: auto; }
.sd-pcat-title { font-size: 22px; font-weight: 800; color: #253D4E; margin: 0 0 10px; text-align: center; }
.sd-pcat-actions { margin: 6px 0 0; text-align: center; }
.sd-pcat-button { display:inline-block; background:#4361ee; color:#fff; padding:10px 14px; border-radius:10px; text-decoration:none; font-weight:700; }
.sd-pcat-button:hover { background:#2f49c4; }

@media (max-width: 1200px) { .sd-pcat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  /* Pull the section and heading slightly upward on mobile */
  .sd-product-categories { padding-top: 10px; }
  .sd-pcat-heading { margin: 2px 0 12px; }
  .sd-pcat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .sd-pcat-media { height: 150px; }
  .sd-pcat-title { font-size: 18px; }
  .sd-pcat-button { font-size: 14px; padding: 8px 12px; }
  .sd-pcat-button .sd-btn-arrow { display: none; }
  /* Match slider edge spacing: bring section closer to screen edges */
  .sd-pcat-container { padding: 0 6px; max-width: calc(100vw - 12px); }
  /* Prevent page from shifting horizontally and rubber-banding */
  html, body { overflow-x: hidden; overscroll-behavior-x: none; }
  body { touch-action: pan-y; }
}

