/*
 * Agoogi full-width shop rows.
 * One horizontal product card per row, six products per page.
 */

/* Override the site's standard 1180px container only on the shop page. */
.shop-page-container {
    width: calc(100% - 48px);
    max-width: none;
    margin-inline: auto;
}

.shop-products-section {
    padding-top: 28px;
}

.shop-toolbar--horizontal {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.shop-toolbar--horizontal > div {
    max-width: 920px;
}

.shop-results-summary {
    flex: 0 0 auto;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* Exactly one card per row, extending across the shop page. */
.shop-product-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
}

.shop-product-card {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: clamp(280px, 31vw, 430px) minmax(0, 1fr);
    min-height: 270px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.shop-product-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.11);
}

.shop-product-media {
    position: relative;
    min-width: 0;
    min-height: 270px;
    overflow: hidden;
    background: #f1f5f9;
}

.shop-product-media > img,
.shop-product-media .slider-track img {
    display: block;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 270px;
    max-height: 360px;
}

.shop-product-media--cover > img,
.shop-product-media--cover .slider-track img {
    object-fit: cover;
    object-position: center;
}

.shop-product-media--contain > img,
.shop-product-media--contain .slider-track img {
    object-fit: contain;
    object-position: center;
    padding: 20px;
    background: #f8fafc;
}

.shop-product-media .slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
    will-change: transform;
}

.shop-product-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 270px;
    padding: 20px;
    color: #64748b;
    font-weight: 700;
    text-align: center;
}

.shop-product-media .slider-btn {
    width: 38px;
    height: 38px;
    font-size: 26px;
}

.shop-product-media .slider-status {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.shop-product-content {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 36px;
    padding: clamp(24px, 3vw, 42px);
}

.shop-product-content h3 {
    margin: 8px 0 10px;
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1.18;
}

.shop-product-content p {
    margin-bottom: 0;
    max-width: 850px;
}

.shop-product-purchase {
    min-width: 205px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.shop-product-purchase .price {
    margin: 0 !important;
    font-size: 22px;
}

.product-actions {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.product-actions form,
.product-actions .btn {
    width: 100%;
    margin: 0;
}

.product-actions .btn {
    justify-content: center;
    white-space: nowrap;
}

.shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.pagination-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-link {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--dark);
    font-weight: 800;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pagination-link:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.pagination-link.is-current {
    border-color: var(--dark);
    background: var(--dark);
    color: #ffffff;
}

.pagination-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.pagination-direction {
    min-width: 112px;
}

.pagination-ellipsis {
    color: #64748b;
    font-weight: 800;
}

@media (max-width: 1050px) {
    .shop-product-card {
        grid-template-columns: minmax(250px, 36%) minmax(0, 1fr);
    }

    .shop-product-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .shop-product-purchase {
        min-width: 0;
    }

    .product-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
    }

    .product-actions form,
    .product-actions .btn {
        width: auto;
    }
}

@media (max-width: 760px) {
    .shop-page-container {
        width: calc(100% - 28px);
    }

    .shop-toolbar--horizontal {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .shop-results-summary {
        white-space: normal;
    }

    .shop-product-card {
        grid-template-columns: 1fr;
    }

    .shop-product-media,
    .shop-product-media > img,
    .shop-product-media .slider-track img,
    .shop-product-placeholder {
        min-height: 230px;
        max-height: 320px;
    }

    .shop-product-content {
        padding: 22px;
    }

    .product-actions,
    .product-actions form,
    .product-actions .btn {
        width: 100%;
    }

    .product-actions {
        flex-direction: column;
    }

    .shop-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination-pages {
        order: -1;
    }

    .pagination-direction {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .shop-page-container {
        width: calc(100% - 20px);
    }
}

/* Category filter and currency display */
.shop-filter-panel {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 26px;
}

.shop-category-form,
.shop-currency-summary {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.shop-category-form label {
    display: block;
    margin-bottom: 10px;
}

.shop-category-controls {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.shop-category-controls select {
    flex: 1 1 auto;
    min-width: 0;
}

.shop-currency-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.shop-currency-summary p,
.converted-price-note,
.product-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.stock-status {
    display: inline-flex;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.82rem;
    font-weight: 800;
}

.stock-status--out {
    background: #fff1f2;
    color: #be123c;
}

/* Compact user currency selector in the main header. */
.header-currency-form {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

.header-currency-form select {
    min-width: 70px;
    height: 42px;
    padding: 0 30px 0 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--dark);
    font-weight: 800;
    cursor: pointer;
}

.header-currency-form .currency-submit {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.shop-cart-table,
.admin-shop-table {
    width: 100%;
    border-collapse: collapse;
}

.shop-cart-table th,
.shop-cart-table td,
.admin-shop-table th,
.admin-shop-table td {
    padding: 12px;
    border-top: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.shop-cart-table thead th,
.admin-shop-table thead th {
    border-top: 0;
    background: #f8fafc;
}

.shop-cart-table .numeric {
    text-align: right;
    white-space: nowrap;
}

.cart-total-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 24px;
    font-size: 1.1rem;
}

.cart-total-panel strong {
    font-size: 1.45rem;
}

.cart-checkout-form {
    text-align: right;
    margin-top: 20px;
}

/* Admin shop */
.admin-shop-container {
    max-width: 1450px;
}

.admin-shop-jump-links {
    margin-bottom: 28px;
}

.admin-shop-panel {
    margin-top: 42px;
    scroll-margin-top: 130px;
}

.admin-shop-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 16px;
}

.admin-shop-form {
    display: grid;
    gap: 16px;
}

.admin-shop-form label {
    display: grid;
    gap: 7px;
    color: var(--dark);
    font-weight: 700;
}

.admin-shop-form label small,
.admin-shop-form .form-help {
    font-weight: 400;
}

.admin-shop-form input[type="text"],
.admin-shop-form input[type="number"],
.admin-shop-form input[type="file"],
.admin-shop-form select,
.admin-shop-form textarea {
    width: 100%;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.checkbox-row label,
.admin-shop-form label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-product-images {
    margin-top: 18px;
}

.admin-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.admin-image-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.admin-image-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.admin-shop-table-card {
    margin-top: 20px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.admin-category-grid,
.currency-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.currency-form {
    align-content: start;
}

@media (max-width: 1200px) {
    .header-currency-form select {
        min-width: 64px;
    }

    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .shop-filter-panel {
        grid-template-columns: 1fr;
    }

    .header-currency-form {
        width: 100%;
    }

    .header-currency-form select {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .shop-category-controls,
    .admin-shop-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .shop-cart-table th,
    .shop-cart-table td,
    .admin-shop-table th,
    .admin-shop-table td {
        padding: 9px;
        font-size: 0.9rem;
    }

    .cart-total-panel,
    .cart-checkout-form {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Inventory and quantity controls */
.stock-status--low {
    background: #fff7ed;
    color: #c2410c;
}

.product-quantity-label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.product-quantity-row {
    display: grid;
    grid-template-columns: 78px minmax(130px, 1fr);
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.product-quantity-input,
.cart-quantity-input {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--dark);
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.cart-quantity-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.cart-quantity-input {
    width: 72px;
}

.cart-line-note,
.cart-reservation-note {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.84rem;
}

.cart-reservation-note {
    text-align: right;
}

.stock-warning-text {
    color: #c2410c;
    font-weight: 800;
}

button[disabled],
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Administrator order and payment verification */
.admin-order-list {
    display: grid;
    gap: 20px;
}

.admin-order-card {
    scroll-margin-top: 130px;
}

.admin-order-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.admin-order-heading h2 {
    margin: 8px 0 4px;
}

.admin-order-heading p {
    margin: 0;
}

.admin-order-statuses {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.admin-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 18px 0;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.admin-order-items {
    margin: 0 0 18px;
    padding-left: 22px;
}

.admin-order-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
}

.admin-order-actions form {
    margin: 0;
}

.admin-payment-confirm-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-payment-confirm-form label {
    display: grid;
    gap: 6px;
    min-width: min(360px, 100%);
    font-weight: 700;
}

.admin-payment-confirm-form input {
    width: 100%;
}

@media (max-width: 760px) {
    .product-quantity-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .cart-quantity-form,
    .admin-order-heading,
    .admin-payment-confirm-form {
        align-items: stretch;
        flex-direction: column;
    }

    .cart-quantity-input {
        width: 100%;
    }

    .cart-reservation-note {
        text-align: left;
    }

    .admin-order-statuses {
        justify-content: flex-start;
    }
}

/* Discreet quantity-offer messaging */
.quantity-offer-panel {
    width: 100%;
    padding-left: 10px;
    border-left: 2px solid #cbd5e1;
}

.quantity-offer-panel.is-qualified {
    border-left-color: #0f766e;
}

.quantity-offer-hint,
.quantity-offer-price {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.quantity-offer-hint.is-qualified,
.quantity-offer-panel.is-qualified .quantity-offer-hint {
    color: #0f766e;
    font-weight: 700;
}

.quantity-offer-price {
    margin-top: 4px;
    color: #334155;
    font-weight: 700;
}

.quantity-offer-panel--cart {
    margin-top: 8px;
}

.price-before-discount {
    color: #94a3b8;
    font-size: 0.84rem;
    text-decoration: line-through;
}

.cart-total-panel--stacked {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.cart-total-panel--stacked > div {
    min-width: min(100%, 360px);
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.cart-total-panel--stacked .cart-savings-row {
    color: #0f766e;
}

.checkout-price-summary,
.order-savings-summary {
    max-width: 520px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.checkout-price-summary p {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
}

.checkout-price-summary p + p {
    margin-top: 6px;
}

.checkout-savings-row,
.order-savings-summary strong {
    color: #0f766e;
}

.order-savings-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
}

/* Quantity-offer administration */
.admin-offer-entry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
}

.admin-offer-entry-card h3 {
    margin: 8px 0 4px;
}

.admin-offer-entry-card p {
    margin: 0;
}

.quantity-offer-admin-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.quantity-offer-admin-summary .card {
    display: grid;
    gap: 6px;
}

.quantity-offer-admin-summary span {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
}

.quantity-offer-admin-summary strong {
    font-size: 1.35rem;
}

.quantity-offer-admin-list {
    display: grid;
    gap: 14px;
}

.quantity-offer-tier-card {
    margin-bottom: 0;
}

.quantity-offer-example {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.9rem;
}

.quantity-offer-delete-form {
    margin: -8px 0 14px 16px;
}

@media (max-width: 900px) {
    .quantity-offer-admin-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .admin-offer-entry-card {
        align-items: stretch;
        flex-direction: column;
    }

    .quantity-offer-admin-summary {
        grid-template-columns: 1fr;
    }

    .cart-total-panel--stacked {
        justify-items: stretch;
    }
}
