/* ============================================================
   Apple Category Showcase — Front-end Styles
   ============================================================ */

/* ---------- Reset / Base ---------- */
.acs-wrapper *,
.acs-wrapper *::before,
.acs-wrapper *::after {
    box-sizing: border-box;
}

/* ---------- Wrapper (scroll container) ---------- */
.acs-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

/* ---------- Scrollable Track ---------- */
.acs-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    /* hide scrollbar by default */
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge */
    padding: 8px 4px 12px;       /* breathing room for shadows */
}
.acs-track::-webkit-scrollbar {
    display: none;
}
/* Show scrollbar when opted-in */
.acs-show-scrollbar .acs-track {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.acs-show-scrollbar .acs-track::-webkit-scrollbar {
    display: block;
    height: 4px;
}
.acs-show-scrollbar .acs-track::-webkit-scrollbar-thumb {
    background: rgba(120,120,128,0.5);
    border-radius: 99px;
}

/* ---------- Individual Card ---------- */
.acs-card {
    position: relative;
    min-width: 320px;
    width: 320px;
    height: 175px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    scroll-snap-align: start;
    background-size: cover;
    background-position: center;
    background-color: #1c1c1e;
    cursor: pointer;
    /* Subtle lift transition */
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.28s ease;
    will-change: transform;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22), 0 1px 4px rgba(0,0,0,0.18);
}

.acs-card:hover {
    transform: scale(1.035) translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.36), 0 4px 12px rgba(0,0,0,0.22);
    z-index: 2;
}
.acs-card:active {
    transform: scale(0.975);
}

/* ---------- Overlay gradients ---------- */
.acs-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

.acs-scheme-dark .acs-overlay {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.24) 55%,
        rgba(0,0,0,0.08) 100%
    );
}

.acs-scheme-light .acs-overlay {
    background: linear-gradient(
        to top,
        rgba(255,255,255,0.65) 0%,
        rgba(255,255,255,0.18) 60%,
        transparent 100%
    );
}

.acs-scheme-none .acs-overlay {
    display: none;
}

/* ---------- Badge (top-right service label) ---------- */
.acs-badge {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.45);
    white-space: nowrap;
}

.acs-badge-icon {
    font-size: 13px;
    line-height: 1;
}

/* ---------- Card body (bottom text stack) ---------- */
.acs-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0 14px 46px;   /* bottom leaves room for button */
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.acs-card-desc {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255,255,255,0.82);
    margin: 0 0 3px;
    letter-spacing: 0.01em;
}

.acs-card-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.015em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.acs-card-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    color: rgba(255,255,255,0.82);
    margin: 0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* Light scheme text overrides */
.acs-scheme-light .acs-card-title,
.acs-scheme-light .acs-card-subtitle,
.acs-scheme-light .acs-card-desc {
    color: #1c1c1e;
    text-shadow: none;
}
.acs-scheme-light .acs-badge {
    color: #1c1c1e;
    text-shadow: none;
}

/* ---------- Card footer / CTA button ---------- */
.acs-card-footer {
    position: absolute;
    bottom: 12px;
    left: 14px;
    z-index: 10;
}

.acs-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    cursor: pointer;
}

.acs-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.04);
    color: #000;
    text-decoration: none;
}
.acs-btn:active {
    transform: scale(0.96);
}

/* ---------- Navigation Arrows ---------- */
.acs-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(30,30,30,0.75);
    color: #fff;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 0;
    outline: none;
    opacity: 0;
    pointer-events: none;
}

/* Show arrows when hovering the wrapper */
.acs-wrapper:hover .acs-nav-btn {
    opacity: 1;
    pointer-events: auto;
}

.acs-nav-btn:hover {
    background: rgba(50,50,52,0.9);
    transform: translateY(-50%) scale(1.1);
}
.acs-nav-btn:active {
    transform: translateY(-50%) scale(0.94);
}

.acs-nav-btn svg {
    display: block;
    stroke: #fff;
    fill: none;
}

.acs-nav-prev { left: -14px; }
.acs-nav-next { right: -14px; }

/* Hide when at start / end */
.acs-nav-btn.acs-disabled {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- Responsiveness ---------- */
@media (max-width: 768px) {
    .acs-card {
        min-width: 260px !important;
        width: 260px !important;
    }
    .acs-nav-btn {
        display: none;
    }
    .acs-track {
        padding: 6px 2px 10px;
    }
}

@media (max-width: 480px) {
    .acs-card {
        min-width: 80vw !important;
        width: 80vw !important;
    }
}

/* ---------- Drag cursor while dragging ---------- */
.acs-track.acs-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}
