/* Agoogi V6.0 — storefront rails, scheduled catalogue and checkout autofill UX */

.shop-category-chips {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 4px 1px 12px;
    margin: 0 0 12px;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
}

.shop-category-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    background: #fff;
    color: #17324d;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.shop-category-chip:hover,
.shop-category-chip:focus-visible,
.shop-category-chip.is-active {
    border-color: #38bdf8;
    background: #ecfeff;
    color: #075985;
}

.shop-category-rail {
    margin: 0 0 34px;
}

.shop-category-rail__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 13px;
}

.shop-category-rail__header h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
}

.shop-category-rail__header p {
    margin: 4px 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 14px;
}

.shop-rail-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.shop-see-all {
    font-weight: 800;
    color: #0369a1;
    text-decoration: none;
    white-space: nowrap;
}

.shop-rail-arrow {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #dbe4ee;
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(15,23,42,.08);
}

.shop-rail-arrow:hover:not(:disabled),
.shop-rail-arrow:focus-visible:not(:disabled) {
    border-color: #38bdf8;
    background: #f0f9ff;
}

.shop-rail-arrow:disabled {
    opacity: .32;
    cursor: default;
}

.shop-rail-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 282px);
    gap: 15px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.shop-product-grid-v60 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.shop-rail-track .shop-product-card,
.shop-product-grid-v60 .shop-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 10px 28px rgba(15,23,42,.07);
}

.shop-rail-track .shop-product-media,
.shop-product-grid-v60 .shop-product-media {
    width: 100%;
    min-height: 205px;
    height: 205px;
    border-radius: 0;
}

.shop-rail-track .shop-product-media > img,
.shop-rail-track .shop-product-media .slider-track img,
.shop-product-grid-v60 .shop-product-media > img,
.shop-product-grid-v60 .shop-product-media .slider-track img {
    width: 100%;
    height: 205px;
}

.shop-rail-track .shop-product-content,
.shop-product-grid-v60 .shop-product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
}

.shop-rail-track .shop-product-main,
.shop-product-grid-v60 .shop-product-main,
.shop-rail-track .shop-product-purchase,
.shop-product-grid-v60 .shop-product-purchase {
    width: 100%;
    min-width: 0;
}

.shop-rail-track .shop-product-content h3,
.shop-product-grid-v60 .shop-product-content h3 {
    margin: 5px 0 8px;
    font-size: 17px;
    line-height: 1.28;
}

.shop-rail-track .shop-product-flags,
.shop-product-grid-v60 .shop-product-flags {
    margin-bottom: 9px;
}

.shop-product-badge-special {
    background: #fff7ed !important;
    color: #9a3412 !important;
    border: 1px solid #fed7aa;
}

.shop-rail-track .shop-product-details,
.shop-product-grid-v60 .shop-product-details {
    width: 100%;
}

.shop-rail-track .shop-product-details > summary,
.shop-product-grid-v60 .shop-product-details > summary {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 13px;
}

.shop-rail-track .shop-product-details__body,
.shop-product-grid-v60 .shop-product-details__body {
    max-height: 260px;
    overflow: auto;
    font-size: 13px;
}

.shop-rail-track .shop-product-purchase,
.shop-product-grid-v60 .shop-product-purchase {
    margin-top: auto;
}

.shop-rail-track .price,
.shop-product-grid-v60 .price {
    margin: 0 0 4px;
    font-size: 19px;
}

.shop-rail-track .stock-status,
.shop-product-grid-v60 .stock-status {
    display: block;
    min-height: 38px;
    margin: 5px 0 10px;
    font-size: 12px;
    line-height: 1.4;
}

.shop-rail-track .product-actions,
.shop-product-grid-v60 .product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.shop-rail-track .product-actions .btn,
.shop-product-grid-v60 .product-actions .btn,
.shop-rail-track .product-actions form,
.shop-product-grid-v60 .product-actions form {
    width: 100%;
}

.shop-rail-track .product-quantity-row,
.shop-product-grid-v60 .product-quantity-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 7px;
}

.shop-rail-track .product-share-row,
.shop-product-grid-v60 .product-share-row {
    margin-top: 9px;
}

.checkout-save-details {
    display: grid !important;
    grid-template-columns: 20px minmax(0,1fr);
    gap: 9px;
    align-items: start;
    margin-top: 13px !important;
    padding: 11px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.checkout-save-details input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
}

@media (max-width: 760px) {
    .shop-filter-panel {
        gap: 10px;
    }

    .shop-currency-summary p {
        display: none;
    }

    .shop-category-rail {
        margin-bottom: 28px;
    }

    .shop-category-rail__header {
        align-items: center;
    }

    .shop-category-rail__header p {
        display: none;
    }

    .shop-rail-track {
        grid-auto-columns: minmax(225px, 78vw);
        gap: 12px;
        margin-right: -14px;
        padding-right: 14px;
    }

    .shop-product-grid-v60 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .shop-product-grid-v60 .shop-product-media,
    .shop-product-grid-v60 .shop-product-media > img,
    .shop-product-grid-v60 .shop-product-media .slider-track img {
        height: 160px;
        min-height: 160px;
    }

    .shop-product-grid-v60 .shop-product-content {
        padding: 11px;
    }

    .shop-product-grid-v60 .shop-product-content h3 {
        font-size: 15px;
    }

    .shop-rail-arrow {
        display: none;
    }
}

@media (max-width: 520px) {
    .shop-product-grid-v60 {
        grid-template-columns: 1fr 1fr;
    }

    .shop-product-grid-v60 .shop-product-flags span:not(.shop-product-badge-special) {
        display: none;
    }

    .shop-product-grid-v60 .shop-product-details {
        border: 0;
        border-top: 1px solid #e2e8f0;
        border-radius: 0;
    }

    .shop-product-grid-v60 .shop-product-details > summary {
        padding-left: 0;
        padding-right: 0;
    }

    .shop-product-grid-v60 .product-actions .btn {
        padding-inline: 9px;
        font-size: 12px;
    }
}
