/* -------------------------------------------------------------
   Sawarny custom styles.
   All page/component styles extracted from blade files live here.
------------------------------------------------------------- */

/* ============= Utility classes ============= */
.cursor-pointer { cursor: pointer; }
.max-h-30rem { max-height: 30rem; }
.progress-bar-half { width: 50%; }

.popup-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}
.popup-close-above-link { z-index: 2; }

/* ============= Cart toast (global) ============= */
.cart-toast {
    position: fixed;
    top: 24px;
    inset-inline-end: 24px;
    background: #111;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1080;
}
.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.cart-toast-icon {
    display: inline-grid;
    place-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* ============= Product item (layouts/item.blade.php) ============= */
.aq-product-item.aq-product-main {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.aq-product-item.aq-product-main:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.aq-product-item .aq-product-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aq-common-red, #e53935);
    margin-bottom: 4px;
}
.aq-product-item .aq-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}
.aq-product-item .aq-product-old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 13px;
}
.aq-product-item .aq-product-new-price {
    font-weight: 700;
    color: #111;
}
.item-qty-controls {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    height: 44px;
}
.item-qty-btn {
    border: none;
    background: #f5f5f5;
    width: 44px;
    height: 100%;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    transition: background 0.2s ease;
}
.item-qty-btn:hover {
    background: var(--aq-common-red, #e53935);
    color: #fff;
}
.item-qty-value {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
}
.grc-product-btn.is-in-cart .product-btn-green { display: none; }
.grc-product-btn.is-in-cart .item-qty-controls { display: flex; }

/* ============= Popup (layouts/components/pop-up.blade.php) ============= */
@media (min-width: 992px) {
    .subscribe-popup .aq-card-modal-style-3-box {
        width: 720px;
        max-width: calc(100vw - 40px);
        height: 400px;
        background-size: cover;
        background-position: center;
    }
}

/* ============= Shop desktop categories row ============= */
@media (min-width: 992px) {
    .shop-desktop-categories .aqf-categories-img {
        width: 160px;
        height: 160px;
    }
    .shop-desktop-categories .aqf-categories-item span {
        font-size: 16px;
        margin-top: 8px;
    }
}
@media (min-width: 1400px) {
    .shop-desktop-categories .aqf-categories-img {
        width: 180px;
        height: 180px;
    }
}

/* ============= Shop breadcrumb categories toggle ============= */
.aq-breadcrumb-categories-wrap .cat-hidden {
    display: none;
}
.aq-breadcrumb-categories-wrap.expanded .cat-hidden {
    display: block;
}
@media (min-width: 992px) {
    .aq-breadcrumb-categories-wrap .cat-hidden-desktop {
        display: none;
    }
    .aq-breadcrumb-categories-wrap.expanded .cat-hidden-desktop {
        display: block;
    }
}
.btn-toggle-categories {
    border: none;
    background: transparent;
    color: var(--aq-common-black, #111);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    transition: color 0.25s ease;
}
.btn-toggle-categories:hover {
    color: var(--aq-common-red, #e53935);
}
.btn-toggle-categories .chevron {
    display: inline-flex;
    transition: transform 0.25s ease;
}
.btn-toggle-categories[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* ============= Login OTP modal ============= */
.otp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    align-items: center;
    justify-content: center;
}
.otp-modal.show { display: flex; }
.otp-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.otp-modal-dialog {
    position: relative;
    width: calc(100% - 32px);
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 40px 24px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    margin: 16px;
    box-sizing: border-box;
}
.otp-modal-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f1f1f1;
    color: #111;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}
.otp-modal-close:hover { background: #e2e2e2; }
.otp-modal-header h3 { margin-bottom: 8px; }
.otp-modal-header p { color: #666; margin-bottom: 0; }
.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-top: 24px;
}
.otp-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.otp-input:focus {
    border-color: var(--aq-common-red, #e53935);
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.15);
}
.otp-resend-btn {
    border: none;
    background: transparent;
    color: var(--aq-common-red, #e53935);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.otp-resend-btn:hover { text-decoration: underline; }

/* ============= Register page ============= */
.register-wrapper {
    padding: 40px 30px;
}
@media (min-width: 992px) {
    .register-wrapper { padding: 60px 60px; }
}
.register-thumb-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
}
.register-thumb-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (min-width: 992px) {
    .register-thumb-wrap {
        position: sticky;
        top: 0;
        height: 100vh;
        min-height: 100%;
    }
}
.register-hint {
    font-size: 13px;
    color: #666;
    margin: 6px 0 0;
    line-height: 1.5;
}
.register-section-divider {
    margin: 30px 0 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.register-section-divider h4 {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}
.register-section-divider p {
    font-size: 13px;
    color: #888;
    margin: 0;
}
.register-avatar-picker {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    background: #fafafa;
}
.register-avatar-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #888;
}
.register-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.register-avatar-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--aq-common-red, #e53935);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
}
.register-avatar-btn:hover {
    background: #b71c1c;
    color: #fff;
}
.register-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.register-file-drop {
    display: block;
    width: 100%;
    height: 140px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    background: #fafafa;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.register-file-drop:hover {
    border-color: var(--aq-common-red, #e53935);
    background: #fff;
}
.register-file-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
}
.register-file-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    display: block;
}

/* ============= Product details page ============= */
.pd-breadcrumb-area {
    padding: 30px 0 10px;
}
.product-slider-nav-simple {
    gap: 0;
}
.product-thumb-btn {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    background: #f8f8f8;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.product-thumb-btn img {
    width: 100%;
    height: auto;
    display: block;
}
.product-thumb-btn:hover {
    border-color: rgba(0, 0, 0, 0.15);
}
.product-thumb-btn.is-active {
    border-color: var(--aq-common-red, #e53935);
}
.product-slider-main-simple {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}
.product-slider-main-simple img {
    width: 100%;
    display: block;
}
@media (min-width: 1200px) {
    .product-thumb-btn {
        width: 100%;
        height: calc((30rem - 1rem) / 3);
        display: block;
    }
    .product-thumb-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .product-slider-main-simple { height: 30rem; }
    .product-slider-main-simple img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}
.product-details-desc-list { padding-left: 18px; margin-bottom: 20px; }
.product-details-desc-list li { margin-bottom: 6px; color: #555; }
.product-details-info-table { width: 100%; border-collapse: collapse; }
.product-details-info-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
}
.product-details-info-table td:first-child {
    font-weight: 600;
    width: 30%;
    color: #333;
}
.review-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.review-item-stars { color: #f5a623; letter-spacing: 2px; margin-bottom: 6px; }
.review-item-name { font-weight: 700; margin: 0 0 2px; }
.review-item-date { color: #888; font-size: 13px; }
.review-item p { margin-top: 8px; color: #555; }
.review-value-number {
    font-size: 48px;
    font-weight: 700;
    display: block;
    line-height: 1;
}
.review-value-stars { color: #f5a623; font-size: 20px; letter-spacing: 3px; margin-top: 8px; }
.product-details-nav .nav-links {
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.product-details-nav .nav-links.active {
    color: var(--aq-common-red, #e53935);
    border-bottom-color: var(--aq-common-red, #e53935);
}
.aq-section-title { font-size: 26px; font-weight: 700; color: #111; }
.aq-section-subtitle { color: #666; font-size: 15px; margin-bottom: 0; }

/* ============= Cart / Reservation page ============= */
.reservation-table small {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* Desktop: keep the reservation table as a normal table sized to its container,
   overriding the theme's forced 840px min-width + horizontal scroll for md/lg. */
@media (min-width: 768px) {
    .aq-cart-list {
        overflow-x: visible !important;
    }
    .aq-cart-list table.reservation-table {
        width: 100% !important;
        display: table !important;
        table-layout: auto !important;
    }
    .aq-cart-list .table.reservation-table > :not(caption) > * > * {
        padding: 20px 8px !important;
        vertical-align: middle;
    }
    .reservation-table thead { display: table-header-group !important; }
    .reservation-table tbody { display: table-row-group !important; }
    .reservation-table tr {
        display: table-row !important;
        grid-template-columns: none !important;
        grid-template-areas: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .reservation-table td,
    .reservation-table th {
        display: table-cell !important;
        vertical-align: middle !important;
    }

    /* Explicit column widths — img|title|price|qty|action.
       Selector is fully-qualified so it beats the theme's `.aq-cart-list .table > :not(caption) > * > *` padding. */
    .aq-cart-list .table.reservation-table td.aq-cart-img {
        width: 90px !important;
        padding: 20px 0 !important;
    }
    .aq-cart-list .table.reservation-table td.aq-cart-title {
        width: auto !important;
        padding: 20px 12px 20px 8px !important;
    }
    .aq-cart-list .table.reservation-table td.aq-cart-price {
        width: 130px !important;
    }
    .aq-cart-list .table.reservation-table td.aq-cart-quantity {
        width: 170px !important;
    }
    .aq-cart-list .table.reservation-table td.aq-cart-action {
        width: 110px !important;
        text-align: right !important;
    }

    .reservation-table td.aq-cart-img img {
        width: 90px;
        height: 90px;
        object-fit: cover;
        display: block;
        border-radius: 6px;
    }
    .reservation-table td.aq-cart-title a { color: #111; font-weight: 500; }
    .reservation-table td.aq-cart-title small { display: block; font-size: 12px; color: #888; margin-top: 4px; }
    .reservation-table td.aq-cart-action .aq-cart-action-btn span { display: inline; }
}

/* Mobile: reservation row = image | (title + price + qty) | remove-X */
@media (max-width: 767.98px) {
    /* Kill the theme's forced overflow / min-width on the wrapper + table */
    .aq-cart-list {
        overflow-x: visible !important;
        margin-right: 0 !important;
        margin-inline-end: 0 !important;
    }
    .aq-cart-list table.reservation-table {
        width: 100%;
    }
    .aq-cart-list .table.reservation-table > :not(caption) > * > * {
        padding: 0;
        vertical-align: top;
    }
    .reservation-table thead { display: none; }
    .reservation-table,
    .reservation-table tbody {
        display: block;
        width: 100%;
    }
    .reservation-table tr {
        display: grid;
        grid-template-columns: 90px 1fr auto;
        grid-template-areas:
            "img title action"
            "img price action"
            "img qty   action";
        align-items: start;
        column-gap: 12px;
        row-gap: 2px;
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        border: 1px solid #ececec;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    }
    .reservation-table td.aq-cart-title { grid-area: title; }
    .reservation-table td.aq-cart-price { grid-area: price; align-self: center; }
    .reservation-table td.aq-cart-quantity { grid-area: qty; align-self: center; }
    .reservation-table td.aq-cart-img { align-self: center; }
    .reservation-table td.aq-cart-action { align-self: center; }
    .reservation-table td {
        display: block;
        border: none;
        padding: 0;
    }
    .reservation-table td.aq-cart-img {
        grid-area: img;
    }
    .reservation-table td.aq-cart-img img {
        width: 90px;
        height: 90px;
        object-fit: cover;
        border-radius: 8px;
        display: block;
    }
    .reservation-table td.aq-cart-title,
    .reservation-table td.aq-cart-price,
    .reservation-table td.aq-cart-quantity {
        width: auto !important;
        padding-inline-start: 0 !important;
        padding-inline-end: 0 !important;
    }
    .reservation-table td.aq-cart-title {
        margin-bottom: 2px;
        line-height: 1.25;
    }
    .reservation-table td.aq-cart-title a {
        font-weight: 600;
        color: #111;
        font-size: 15px;
    }
    .reservation-table td.aq-cart-title small {
        margin-top: 0;
        font-size: 11px;
    }
    .reservation-table td.aq-cart-price {
        margin-bottom: 4px;
        font-weight: 700;
        color: var(--aq-common-red, #e53935);
        line-height: 1.2;
    }
    .reservation-table td.aq-cart-price span {
        font-size: 14px;
    }
    .reservation-table td.aq-cart-quantity {
        line-height: 1;
    }
    .reservation-table td.aq-cart-quantity .aq-product-quantity {
        margin: 0 !important;
        padding: 0;
    }
    .reservation-table td.aq-cart-action {
        grid-area: action;
        text-align: right;
    }
    .reservation-table td.aq-cart-action .aq-cart-action-btn {
        padding: 6px;
        color: #999;
    }
    .reservation-table td.aq-cart-action .aq-cart-action-btn:hover {
        color: var(--aq-common-red, #e53935);
    }
    .reservation-table td.aq-cart-action .aq-cart-action-btn span { display: none; }
}
.reservation-dates {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reservation-date-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.reservation-date-field {
    width: 100%;
    height: 44px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.reservation-date-field:focus {
    border-color: var(--aq-common-red, #e53935);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}
.reservation-date-field:invalid {
    border-color: #dc3545;
}
.reservation-terms-link {
    color: var(--aq-common-red, #e53935);
    font-weight: 600;
    text-decoration: underline;
}
.reservation-terms-link:hover { color: #b71c1c; }
.reservation-days-row {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}
.reservation-days-value {
    font-weight: 600;
    color: #111;
}
.reservation-error {
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

/* ============= Thank You page ============= */
.thank-you-card {
    background: #fff;
    border-radius: 12px;
    padding: 60px 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
.thank-you-icon {
    color: #1e7e34;
    display: inline-flex;
}
.thank-you-title {
    font-size: 32px;
    font-weight: 700;
    color: #111;
}
.thank-you-lead {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}
.thank-you-actions .aq-cart-checkout-btn,
.thank-you-actions .aq-btn-black {
    display: inline-block;
    padding: 12px 26px;
}

/* ============= Legal pages (terms / policy) ============= */
.legal-page-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 10px;
    color: #111;
}
.legal-page-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 12px;
}
.legal-page-updated {
    font-size: 13px;
    color: #888;
    margin-bottom: 24px;
}
.legal-page-content a {
    color: var(--aq-common-red, #e53935);
    text-decoration: underline;
}

/* ============= No horizontal scroll on mobile =============
   Belt-and-braces fix: lock the body to the viewport width so a stray
   negative margin / wide image / drawer never leaks horizontally on
   small screens. Drawers that are supposed to slide in from off-screen
   use position:fixed so they still work. */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ============= Back-to-top on mobile =============
   The bottom-sticky nav (d-md-none) covers the lower-right corner on
   phones, so lift the back-to-top button above it. */
@media (max-width: 767.98px) {
    .progress-wrap.active-progress {
        bottom: 80px;
    }
}

/* ============= Product details — thumbnail nav =============
   Keep every thumbnail the same square size so the vertical rail
   lines up neatly regardless of the source image aspect ratio. */
.product-slider-nav-simple .product-thumb-btn {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}
.product-slider-nav-simple .product-thumb-btn.is-active {
    border-color: #111;
}
.product-slider-nav-simple .product-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============= No horizontal scroll on mobile (strong) =============
   Belt-and-braces fix: lock the viewport so a stray negative margin /
   wide image / drawer never leaks horizontally on small screens. */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}
body > main,
body > header,
body > footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* ============= Mobile bottom nav spacing =============
   The fixed .aq-bottom-menu overlaps the footer's copyright + terms/policy
   row on phones. Push the page content up by its height so the whole
   footer (including the copyright line) is visible above the nav. */
@media (max-width: 767.98px) {
    body { padding-bottom: 72px; }
}
