/* ==========================================================================
   SAGMART — Phase D Responsive Enhancement v2.1
   Fixes: single product mobile, search bar, quantity controls,
   checkout at 320px, shop page, order details, wishlist, payment section
   ========================================================================== */

/* -----------------------------------------------
   GLOBAL: Prevent horizontal scroll on all pages
   ----------------------------------------------- */
html, body {
    overflow-x: clip;
    max-width: 100vw;
}
* {
    box-sizing: border-box;
}
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* -----------------------------------------------
   HEADER: Search bar & mobile tweaks
   ----------------------------------------------- */
@media (max-width: 991px) {
    /* Search bar stays hidden by default on mobile and toggles only on click */
    .header-search-bar {
        display: none;
        width: 100%;
    }
    .header-search-bar.is-open {
        display: block;
    }
    .header-search-input {
        min-width: 0;
        width: 100%;
    }
    /* Keep mobile header clean and compact on one row */
    .site-header {
        padding: 0;
    }
    .header-container {
        flex-wrap: nowrap;
        height: auto;
        min-height: 60px;
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 0.5rem;
        overflow: visible;
    }
    .header-logo {
        flex-shrink: 1;
        width: auto;
        max-width: 150px;
    }
    .header-logo img,
    .header-logo .custom-logo,
    .header-logo-img {
        max-height: 36px;
        max-width: 150px;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 8px 0.75rem;
        height: auto;
        min-height: 54px;
        flex-wrap: nowrap;
    }
    .header-logo {
        order: 1;
        max-width: 132px;
    }
    .header-logo img,
    .header-logo .custom-logo,
    .header-logo-img {
        max-height: 32px;
        max-width: 130px;
    }
    .header-actions {
        order: 2;
        flex-shrink: 0;
        gap: 4px;
    }
    .footer-logo img,
    .footer-logo .custom-logo,
    .footer-logo-img {
        max-height: 38px;
        max-width: 140px;
    }
}

/* -----------------------------------------------
   SINGLE PRODUCT PAGE: Hero Layout (Large Gallery, Inline Title, Side-by-Side Buttons)
   ----------------------------------------------- */
.single-product .product-main-wrap {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    gap: 48px !important;
    margin-bottom: 24px !important;
    align-items: start !important;
}

/* Left Gallery Column: 1.5x Wider Product Image */
.product-gallery-col {
    position: relative !important;
    width: 100% !important;
}

.product-gallery-col .onsale {
    position: absolute !important;
    top: 18px !important;
    left: 18px !important;
    z-index: 10 !important;
    margin: 0 !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.product-gallery-col .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: relative !important;
}

.product-gallery-col .woocommerce-product-gallery__image {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid var(--color-border, #e2e8f0) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px !important;
    box-sizing: border-box !important;
    min-height: 480px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

.product-gallery-col .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    max-height: 460px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    transform: scale(1.15) !important;
}

.product-gallery-col .woocommerce-product-gallery__trigger {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 9 !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Right Summary Column */
.product-summary-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.product-summary-col .product_title,
.product_title.entry-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: var(--color-primary, #0f172a) !important;
    margin: 0 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
}

.product-summary-col .price {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--color-primary, #0f172a) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
}

/* Product Actions Bar: Quantity, Add to Cart, Buy Now, and Wishlist */
form.cart {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important; /* Allow wrapping so Add to Wishlist is clearly visible on full row */
    align-items: center !important;
    gap: 12px !important;
    margin: 16px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Quantity Box: perfectly sized 126px with ZERO button clipping */
form.cart .quantity,
.woocommerce div.product form.cart .quantity,
.single-product-details .quantity,
.quantity {
    flex: 0 0 126px !important;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    height: 48px !important;
    border: 1.5px solid var(--color-border, #e2e8f0) !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
}

form.cart .quantity .qty-btn,
.woocommerce div.product form.cart .quantity .qty-btn,
.quantity .qty-btn {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    color: var(--color-primary, #0f172a) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    border-radius: 50% !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    box-sizing: border-box !important;
    outline: none !important;
}

form.cart .quantity .qty-btn:hover,
.quantity .qty-btn:hover {
    background: #f1f5f9 !important;
    color: #0047ff !important;
}

/* Quantity input: transparent, no browser borders, centered */
form.cart .quantity input.input-text.qty,
form.cart .quantity input[type="text"],
form.cart .quantity input[type="number"],
form.cart .quantity input.qty,
.woocommerce div.product form.cart .quantity input.qty,
.quantity input.qty {
    flex: 1 1 auto !important;
    width: 44px !important;
    min-width: 38px !important;
    max-width: 48px !important;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--color-primary, #0f172a) !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
    box-sizing: border-box !important;
}

form.cart .quantity input::-webkit-outer-spin-button,
form.cart .quantity input::-webkit-inner-spin-button,
.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Add to Cart button */
form.cart .single_add_to_cart_button {
    flex: 1 1 135px !important;
    height: 48px !important;
    min-width: 120px !important;
    background: #111111 !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    font-size: 14.5px !important;
    white-space: nowrap !important;
    padding: 0 18px !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

form.cart .single_add_to_cart_button:hover {
    background: #0047ff !important;
}

/* Buy Now button */
form.cart .buy-now-btn {
    flex: 1 1 135px !important;
    height: 48px !important;
    min-width: 120px !important;
    background: var(--color-accent, #55775c) !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    font-size: 14.5px !important;
    white-space: nowrap !important;
    padding: 0 18px !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

form.cart .buy-now-btn:hover {
    background: #3e5a44 !important;
}

/* Add to Wishlist Button: Full width row directly under Add to Cart & Buy Now */
form.cart .single-wishlist-btn,
.single-wishlist-btn {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 20px !important;
    margin: 6px 0 0 0 !important;
    border-radius: 9999px !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    clear: both !important;
    z-index: 1 !important;
}

form.cart .single-wishlist-btn:hover,
.single-wishlist-btn:hover {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: #fff5f5 !important;
    opacity: 1 !important;
    transform: translateY(-1px) !important;
}

form.cart .single-wishlist-btn.active,
form.cart .single-wishlist-btn.is-wishlisted,
.single-wishlist-btn.active,
.single-wishlist-btn.is-wishlisted {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    opacity: 1 !important;
}

form.cart .single-wishlist-btn.active svg,
form.cart .single-wishlist-btn.is-wishlisted svg,
.single-wishlist-btn.active svg,
.single-wishlist-btn.is-wishlisted svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
    color: #ef4444 !important;
}

/* Secondary Meta: Share & Category */
.product-summary-col .product-share {
    margin-top: 2px !important;
}

.product-summary-col .product_meta {
    margin-top: 2px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
}

/* Information Tabs Pulled Up Closer */
.single-product div.product .woocommerce-tabs {
    margin-top: 8px !important;
    padding-top: 0 !important;
    clear: both !important;
}

.single-product div.product .woocommerce-tabs ul.tabs {
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--color-border, #e2e8f0) !important;
}

.single-product div.product .woocommerce-tabs ul.tabs li {
    margin-bottom: -1px !important;
}

/* -----------------------------------------------
   SINGLE PRODUCT PAGE: Full responsive fix
   ----------------------------------------------- */
@media (max-width: 991px) {
    .product-main-wrap {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .woocommerce-product-gallery {
        max-width: 420px;
        margin: 0 auto;
    }
    .summary.entry-summary {
        padding: 0 !important;
    }
    .product-summary-top {
        padding: 0;
    }
}

@media (max-width: 767px) {
    /* Prevent one-char-per-line wrapping of product description */
    .woocommerce-product-details__short-description,
    .woocommerce-Tabs-panel,
    .product-full-description,
    .entry-summary p,
    .woocommerce-product-description,
    .sagmart-product-desc {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    /* Product title */
    .product_title.entry-title {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
    }
    /* Quantity + Add to cart row on tablets */
    form.cart {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 10px !important;
    }
    form.cart .quantity {
        width: 126px !important;
        min-width: 126px !important;
    }
    .single_add_to_cart_button,
    .buy-now-btn {
        flex: 1 1 120px !important;
        min-width: 120px !important;
    }
    form.cart .single-wishlist-btn,
    .single-wishlist-btn {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin-top: 6px !important;
    }
    /* Product meta (SKU, category) */
    .product_meta {
        font-size: 0.8rem;
        word-break: break-word;
    }
    /* Product variations */
    .variations_form table.variations {
        display: block;
        width: 100%;
    }
    .variations_form table.variations tr,
    .variations_form table.variations td,
    .variations_form table.variations th {
        display: block;
        width: 100%;
    }
    .variations_form table.variations select {
        width: 100% !important;
        max-width: 100% !important;
    }
    /* Tabs */
    .woocommerce-tabs ul.tabs {
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0;
        padding-bottom: 0;
    }
    .woocommerce-tabs ul.tabs li {
        flex-shrink: 0;
    }
    .woocommerce-tabs ul.tabs li a {
        padding: 10px 14px;
        font-size: 0.82rem;
    }
    /* Reviews: stack */
    #reviews {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    /* Related products */
    .related.products ul.products,
    .up-sells ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 390px) {
    .product_title.entry-title {
        font-size: 1.15rem !important;
    }
    .woocommerce-product-gallery {
        max-width: 100%;
    }
}

/* -----------------------------------------------
   SHOP PAGE: Filter & grid
   ----------------------------------------------- */
@media (max-width: 767px) {
    /* WooCommerce result count + ordering */
    .woocommerce-result-count,
    .woocommerce-ordering select {
        font-size: 0.8rem;
    }
    .woocommerce-ordering select {
        max-width: 100%;
        width: auto;
    }
    /* Shop toolbar wrapping */
    .woocommerce-shop-toolbar,
    .shop-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    /* Products 2 col on mobile */
    ul.products.columns-4,
    ul.products.columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    ul.products.columns-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 390px) {
    ul.products.columns-4,
    ul.products.columns-3,
    ul.products.columns-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
}

/* -----------------------------------------------
   CART PAGE: Table & totals
   ----------------------------------------------- */
@media (max-width: 991px) {
    /* Cart: stack vertically */
    .woocommerce-page .woocommerce,
    .woocommerce-cart .woocommerce {
        display: flex;
        flex-direction: column;
    }
    .woocommerce-cart-form {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cart-collaterals {
        width: 100% !important;
    }
    .cart_totals {
        width: 100% !important;
        max-width: 100% !important;
    }
    /* Coupon form in cart */
    .coupon {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    .coupon input.input-text {
        width: 100% !important;
    }
    .coupon .button {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Cart totals table */
    .cart_totals table.shop_table {
        font-size: 0.9rem;
    }
    .cart_totals .order-total .amount {
        font-size: 1.15rem;
    }
    /* Cart quantity control */
    .woocommerce-cart-form td.product-quantity {
        min-width: 120px;
    }
}

/* -----------------------------------------------
   CHECKOUT: Payment section & form at 320px
   ----------------------------------------------- */
@media (max-width: 480px) {
    .woocommerce-checkout .sagmart-container {
        padding: 16px 12px 32px !important;
    }
    #customer_details {
        padding: 18px 14px !important;
    }
    .checkout-order-review-wrap,
    #checkout-order-review-wrap {
        padding: 18px 14px !important;
    }
    /* Payment box: no horizontal overflow */
    #payment {
        overflow: hidden;
    }
    #payment ul.payment_methods {
        overflow: hidden;
    }
    #payment ul.payment_methods li.wc_payment_method label {
        flex-wrap: wrap;
        font-size: 0.88rem;
    }
    /* Fields at 320px: full width */
    .form-row-first,
    .form-row-last {
        float: none !important;
        width: 100% !important;
    }
    /* Order review table */
    table.shop_table.woocommerce-checkout-review-order-table {
        font-size: 0.82rem;
    }
    table.shop_table.woocommerce-checkout-review-order-table td,
    table.shop_table.woocommerce-checkout-review-order-table th {
        padding: 8px 10px;
        word-break: break-word;
    }
    /* Place order button */
    #place_order {
        padding: 14px 16px !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 320px) {
    .woocommerce-checkout .sagmart-container {
        padding: 12px 10px 28px !important;
    }
    #customer_details {
        padding: 14px 10px !important;
    }
    .woocommerce-checkout h3 {
        font-size: 1rem !important;
    }
    input.input-text,
    select,
    textarea {
        font-size: 0.82rem !important;
    }
}

/* -----------------------------------------------
   MY ACCOUNT: Order details table
   ----------------------------------------------- */
@media (max-width: 767px) {
    /* Order details table */
    .woocommerce-order-details .shop_table,
    .woocommerce-customer-details .shop_table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.82rem;
    }
    /* Order list in my account */
    .woocommerce-orders-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .woocommerce-orders-table th,
    .woocommerce-orders-table td {
        padding: 8px 10px;
    }
    .woocommerce-orders-table .button {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
    }
    /* Address detail */
    address {
        font-size: 0.88rem;
        line-height: 1.6;
    }
}

/* -----------------------------------------------
   WISHLIST PAGE
   ----------------------------------------------- */
@media (max-width: 767px) {
    .sagmart-wishlist-grid,
    .wishlist-products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
}
@media (max-width: 390px) {
    .sagmart-wishlist-grid,
    .wishlist-products {
        grid-template-columns: 1fr !important;
    }
}

/* -----------------------------------------------
   ABOUT US & CONTACT: Fine-tuning at 320px
   ----------------------------------------------- */
@media (max-width: 480px) {
    .about-tagline {
        font-size: 1.25rem !important;
    }
    .contact-form-field input,
    .contact-form-field textarea,
    .contact-form-field select {
        font-size: 0.88rem;
        padding: 10px 12px;
    }
    .contact-submit-btn {
        width: 100%;
    }
}

/* -----------------------------------------------
   FOOTER: 320px
   ----------------------------------------------- */
@media (max-width: 480px) {
    .footer-links-cols {
        grid-template-columns: 1fr !important;
    }
    .footer-brand-desc {
        font-size: 0.82rem;
    }
    .footer-newsletter form {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer-newsletter input[type="email"] {
        width: 100%;
    }
    .footer-newsletter button {
        width: 100%;
    }
}

/* -----------------------------------------------
   WOOCOMMERCE NOTICES: Modern popup, zero overlap
   ----------------------------------------------- */
.woocommerce-notices-wrapper {
    width: 100% !important;
    max-width: 624px !important;
    margin: 0 auto 20px auto !important;
    box-sizing: border-box !important;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 16px 0 !important;
    padding: 16px 44px 16px 60px !important; /* 60px padding prevents any overlap with icon */
    border-radius: 12px !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    list-style: none !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    border-left: 5px solid transparent !important;
    word-break: break-word !important;
    transition: opacity 0.6s ease, transform 0.6s ease, max-height 0.5s ease;
}

.woocommerce-error {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-left: 5px solid #ef4444 !important;
    border-top: none !important;
}

.woocommerce-message {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-left: 5px solid #22c55e !important;
    border-top: none !important;
}

.woocommerce-info {
    background: #eff6ff !important;
    color: #1e40af !important;
    border-left: 5px solid #3b82f6 !important;
    border-top: none !important;
}

.woocommerce-error::before,
.woocommerce-message::before,
.woocommerce-info::before {
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: 14.5px !important;
    line-height: 1.5 !important;
    width: 100% !important;
}

/* -----------------------------------------------
   QUANTITY CONTROLS: Always usable
   ----------------------------------------------- */
.quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 126px !important;
    min-width: 126px !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #ffffff !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
}
.quantity .qty-btn {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    outline: none !important;
}
.quantity input.input-text.qty,
.quantity input[type="text"],
.quantity input[type="number"],
.quantity input.qty {
    flex: 1 1 auto !important;
    width: 44px !important;
    min-width: 38px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* -----------------------------------------------
   PAYMENT GATEWAY SECTION: Clean display
   ----------------------------------------------- */
.woocommerce-checkout #payment {
    overflow: hidden;
}
.payment_method_razorpay label img,
.payment_method_paypal label img {
    max-height: 24px !important;
    width: auto !important;
    vertical-align: middle;
}
/* Razorpay checkout section */
.sagmart-razorpay-pay-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--color-accent, #55775c);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 1rem;
}
.sagmart-razorpay-pay-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.sagmart-payment-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #856404;
    margin: 12px 0;
}

/* -----------------------------------------------
   PRODUCT CUSTOM FIELDS: Frontend tabs
   (Loaded via sagmart-product-fields plugin)
   ----------------------------------------------- */
.sagmart-product-info-tabs {
    margin: 2rem 0;
}
.sagmart-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border, #eaeaea);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.sagmart-tab-btn {
    background: none;
    border: none;
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-secondary, #555);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sagmart-tab-btn:hover,
.sagmart-tab-btn.active {
    color: var(--color-primary, #111);
    border-bottom-color: var(--color-primary, #111);
}
.sagmart-tab-panel {
    display: none;
    padding: 1.5rem 0;
}
.sagmart-tab-panel.active {
    display: block;
}
.sagmart-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.sagmart-specs-table tr:nth-child(even) {
    background: var(--color-bg-alt, #f9f9f9);
}
.sagmart-specs-table td {
    padding: 10px 14px;
    border: 1px solid var(--color-border, #eaeaea);
    vertical-align: top;
}
.sagmart-specs-table td:first-child {
    font-weight: 600;
    color: var(--color-primary, #111);
    width: 35%;
    background: var(--color-bg-hero, #ece9df);
}
.sagmart-key-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sagmart-key-features ul li {
    padding: 8px 0 8px 24px;
    position: relative;
    border-bottom: 1px solid var(--color-border, #f0f0f0);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-secondary, #555);
}
.sagmart-key-features ul li:last-child {
    border-bottom: none;
}
.sagmart-key-features ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent, #55775c);
    font-weight: 700;
}
.sagmart-warranty-section {
    background: var(--color-bg-alt, #f9f9f9);
    border-radius: 12px;
    padding: 1.25rem;
}
.sagmart-warranty-row {
    display: flex;
    gap: 0.75rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border, #eaeaea);
    font-size: 0.9rem;
}
.sagmart-warranty-row:last-child {
    border-bottom: none;
}
.sagmart-warranty-label {
    font-weight: 600;
    color: var(--color-primary, #111);
    min-width: 140px;
    flex-shrink: 0;
}
.sagmart-inbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sagmart-inbox-list li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 0.9rem;
    color: var(--color-secondary, #555);
}
.sagmart-inbox-list li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--color-accent, #55775c);
}

@media (max-width: 767px) {
    .sagmart-specs-table td:first-child {
        width: 40%;
    }
    .sagmart-warranty-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    .sagmart-warranty-label {
        min-width: 0;
    }
}

/* ==========================================================================
   ORDER RECEIVED (THANK YOU) PAGE & PRINT STYLES
   ========================================================================== */
.sagmart-order-received-wrap {
    max-width: 820px;
    margin: 40px auto 100px;
    padding: 0 20px;
    box-sizing: border-box;
    clear: both;
}

.sagmart-order-card {
    background: #ffffff;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.sagmart-success-badge {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px dashed var(--color-border, #e2e8f0);
}

.sagmart-checkmark-circle {
    width: 64px;
    height: 64px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.25);
}

.sagmart-success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary, #0f172a);
    margin: 0 0 8px 0;
}

.sagmart-success-subtitle {
    font-size: 14.5px;
    color: #64748b;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Metadata Grid */
.sagmart-order-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.sagmart-order-meta-grid .meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sagmart-order-meta-grid .meta-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
}

.sagmart-order-meta-grid .meta-value {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.sagmart-order-meta-grid .total-highlight {
    color: var(--color-accent, #55775c);
    font-size: 16px;
}

/* Destination Block */
.sagmart-destination-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.destination-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary, #0f172a);
    margin-bottom: 10px;
}

.destination-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.destination-body p {
    margin: 0 0 4px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #334155;
}

.destination-body .customer-name {
    font-size: 14.5px;
    color: #0f172a;
}

.destination-body .customer-contact {
    margin-top: 6px;
    font-size: 12.5px;
    color: #64748b;
}

/* Items Summary Table */
.sagmart-items-summary-block {
    margin-bottom: 28px;
}

.sagmart-items-summary-block h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #0f172a;
}

.sagmart-receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sagmart-receipt-table th {
    background: #f1f5f9;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 12.5px;
    color: #475569;
    text-align: left;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.sagmart-receipt-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.sagmart-receipt-table tfoot td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.sagmart-receipt-table tfoot tr.grand-total-row td {
    border-top: 2px solid #0f172a;
    border-bottom: 2px solid #0f172a;
    font-size: 16px;
    color: #0f172a;
}

/* Action Buttons */
.sagmart-order-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.sagmart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: none;
}

.sagmart-btn-primary {
    background: #0f172a;
    color: #ffffff !important;
}

.sagmart-btn-primary:hover {
    background: #334155;
    transform: translateY(-1px);
}

.sagmart-btn-secondary {
    background: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
}

.sagmart-btn-secondary:hover {
    background: #e2e8f0;
}

.sagmart-print-only-header,
.sagmart-print-footer {
    display: none;
}

/* Print Stylesheet for Browser Print / PDF Export */
@media print {
    body * {
        visibility: hidden;
    }
    #sagmart-printable-order-slip,
    #sagmart-printable-order-slip * {
        visibility: visible;
    }
    #sagmart-printable-order-slip {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: #ffffff;
    }
    .no-print,
    .site-header,
    .site-footer,
    #colophon,
    #masthead,
    .sagmart-success-badge,
    .sagmart-order-actions {
        display: none !important;
    }
    .sagmart-print-only-header {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 2px solid #0f172a;
        padding-bottom: 14px;
        margin-bottom: 20px;
    }
    .sagmart-print-only-header .print-brand h2 {
        margin: 0 0 4px 0;
        font-size: 26px;
        letter-spacing: 1px;
    }
    .sagmart-print-only-header .print-meta {
        text-align: right;
    }
    .sagmart-print-only-header .print-meta h3 {
        margin: 0 0 4px 0;
        font-size: 14px;
        color: #475569;
    }
    .sagmart-print-footer {
        display: block !important;
        margin-top: 30px;
        padding-top: 14px;
        border-top: 1px solid #e2e8f0;
        font-size: 12px;
        color: #64748b;
        text-align: center;
    }
}

/* Responsive adjust for order confirmation card */
@media (max-width: 640px) {
    .sagmart-order-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sagmart-order-actions {
        flex-direction: column;
        width: 100%;
    }
    .sagmart-btn {
        width: 100%;
    }
    .sagmart-order-card {
        padding: 24px 18px;
    }
}

/* ==========================================================================
   CART SHIPPING & ADDRESS CARD STYLES
   ========================================================================== */
.sagmart-shipping-totals-row td {
    text-align: left !important;
}

.sagmart-cart-shipping-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.sagmart-shipping-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
}

.sagmart-shipping-status-badge .free-zero-tag {
    color: #15803d;
    font-weight: 500;
}

.sagmart-delivery-address-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
    box-sizing: border-box;
    width: 100%;
}

.address-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.address-destination-text {
    margin: 0 0 8px 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
    font-weight: 500 !important;
    word-break: break-word;
    text-align: left !important;
}

.address-change-action {
    text-align: left;
}

.sagmart-change-addr-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #2563eb !important;
    text-decoration: none !important;
    padding: 4px 8px !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
}

.sagmart-change-addr-link:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

/* ==========================================================================
   CHECKOUT PAYMENT METHOD UI CHIPS & BADGES
   ========================================================================== */
.sagmart-payment-channels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.sagmart-channel-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.sagmart-channel-chip strong {
    color: #0f172a;
}

.sagmart-channel-chip .chip-icon {
    font-size: 16px;
}

@media (max-width: 580px) {
    .sagmart-payment-channels-grid {
        grid-template-columns: 1fr;
    }
}

/* Ensure #primary has proper spacing before footer (except on home where feedback section sits flush) */
#primary.site-main,
.woocommerce-checkout,
.woocommerce-order {
    margin-bottom: 60px !important;
    clear: both !important;
}

body.home #primary.site-main {
    margin-bottom: 0 !important;
}

/* Hide redundant raw WooCommerce order details table and addresses on Thank You / Order Received */
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received section.woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details,
.woocommerce-order-received section.woocommerce-customer-details,
.woocommerce-order-received .woocommerce-columns--addresses,
.woocommerce-order-received .woocommerce-thankyou-order-details {
    display: none !important;
}

/* Clearfix for order containers to prevent any footer collision */
.sagmart-order-received-wrap::after,
.woocommerce-order::after,
.site-main::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

#colophon.site-footer {
    position: relative !important;
    clear: both !important;
    z-index: 10 !important;
}

/* ==========================================================================
   SHOP ARCHIVE PAGINATION SPACING FIX (ITEM 1)
   ========================================================================== */
.woocommerce ul.products,
ul.products {
    margin-bottom: 40px !important;
}

.woocommerce-pagination,
nav.woocommerce-pagination {
    margin-top: 55px !important;
    margin-bottom: 55px !important;
    text-align: center !important;
    clear: both !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    padding-top: 20px !important;
}

.woocommerce-pagination ul.page-numbers,
nav.woocommerce-pagination ul.page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-pagination ul.page-numbers li,
nav.woocommerce-pagination ul.page-numbers li {
    border: none !important;
    float: none !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-pagination ul.page-numbers li .page-numbers,
nav.woocommerce-pagination ul.page-numbers li .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-pagination ul.page-numbers li a.page-numbers:hover {
    background: #f1f5f9 !important;
    border-color: #0047ff !important;
    color: #0047ff !important;
    transform: translateY(-2px) !important;
}

.woocommerce-pagination ul.page-numbers li .page-numbers.current,
nav.woocommerce-pagination ul.page-numbers li span.page-numbers.current {
    background: #0047ff !important;
    border-color: #0047ff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 71, 255, 0.25) !important;
}

/* ==========================================================================
   MY ACCOUNT LOGIN CARD 1.3X WIDTH & BLUE LOGIN BUTTON (ITEM 5)
   ========================================================================== */
.sagmart-auth-card {
    max-width: 624px !important; /* 1.3 * 480px = 624px */
    width: 100% !important;
}

.woocommerce-account form.login,
.woocommerce-account form.register,
.sagmart-auth-card form.woocommerce-form-login {
    width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce button.button.sagmart-auth-btn,
.woocommerce-account .sagmart-auth-card button[name="login"],
.woocommerce-account .sagmart-auth-card button[name="register"],
.woocommerce-account .sagmart-auth-card .button,
.woocommerce-account form.login .button,
.sagmart-auth-btn {
    background: #0047ff !important; /* Vibrant Blue */
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: none !important;
    height: 48px !important;
    box-shadow: 0 4px 14px rgba(0, 71, 255, 0.28) !important;
    transition: all 0.2s ease !important;
}

.woocommerce button.button.sagmart-auth-btn:hover,
.woocommerce-account .sagmart-auth-card button[name="login"]:hover,
.woocommerce-account .sagmart-auth-card button[name="register"]:hover,
.woocommerce-account .sagmart-auth-card .button:hover,
.woocommerce-account form.login .button:hover,
.sagmart-auth-btn:hover {
    background: #0036cc !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0, 71, 255, 0.38) !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   MY ACCOUNT DOWNLOADS -> ORDER RECEIPTS & INVOICES (PDF)
   ========================================================================== */
.sagmart-downloads-container {
    width: 100%;
}

.sagmart-downloads-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.sagmart-downloads-hero .hero-icon-pill {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #0f172a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.sagmart-downloads-hero .downloads-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.sagmart-downloads-hero .downloads-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Empty State Card */
.sagmart-empty-downloads-card {
    text-align: center;
    padding: 50px 30px;
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px dashed #cbd5e1;
}

.sagmart-empty-downloads-card .empty-icon-box {
    margin-bottom: 16px;
}

.sagmart-empty-downloads-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.sagmart-empty-downloads-card p {
    font-size: 14px;
    color: #64748b;
    max-width: 440px;
    margin: 0 auto 20px auto;
    line-height: 1.6;
}

.downloads-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.downloads-shop-btn:hover {
    background: #0047ff;
    color: #ffffff;
}

/* Receipts List */
.sagmart-receipts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sagmart-receipt-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sagmart-receipt-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.receipt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}

.receipt-id-date {
    display: flex;
    align-items: center;
    gap: 12px;
}

.receipt-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 12px;
    border-radius: 8px;
}

.receipt-date {
    font-size: 13px;
    color: #64748b;
}

.receipt-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    text-transform: capitalize;
}

.receipt-status-pill .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-processing, .status-completed {
    background: #dcfce7;
    color: #15803d;
}
.status-processing .status-dot, .status-completed .status-dot {
    background: #16a34a;
}

.status-on-hold, .status-pending {
    background: #fef3c7;
    color: #b45309;
}
.status-on-hold .status-dot, .status-pending .status-dot {
    background: #d97706;
}

/* Card Body */
.receipt-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 16px;
}

.receipt-items-preview {
    flex: 1 1 300px;
}

.items-list-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.items-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.items-summary-list li {
    font-size: 13.5px;
    color: #1e293b;
    margin-bottom: 3px;
}

.items-summary-list .item-qty {
    color: #64748b;
    font-size: 12.5px;
    margin-left: 6px;
}

.receipt-total-block {
    text-align: right;
}

.receipt-total-block .total-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.receipt-total-block .total-amount {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

/* Actions Row */
.receipt-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    flex-wrap: wrap;
}

.receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.receipt-btn-download {
    background: #0047ff;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 71, 255, 0.25);
}

.receipt-btn-download:hover {
    background: #0036cc;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 71, 255, 0.35);
}

.receipt-btn-view {
    background: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid #e2e8f0;
}

.receipt-btn-view:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

/* Orders table PDF action button style */
.woocommerce-MyAccount-orders .woocommerce-button.sagmart_pdf_invoice {
    background: #0047ff !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 6px 14px !important;
}
.woocommerce-MyAccount-orders .woocommerce-button.sagmart_pdf_invoice:hover {
    background: #0036cc !important;
}

/* ==========================================================================
   SAGMART v11.0: Equal Left & Right Page Margin Reduction Across All Pages
   Increases central container to 1440px and expands content nicely
   ========================================================================== */
:root {
    --container-max: 1440px !important;
    --container-padding: 1.25rem !important;
}

.sagmart-container,
.site-main > .sagmart-container,
.page-template-default .sagmart-container,
.single-product .sagmart-container,
.archive.woocommerce .sagmart-container,
.woocommerce-cart .sagmart-container,
.woocommerce-checkout .sagmart-container,
.woocommerce-account .sagmart-container {
    max-width: 1440px !important;
    width: 100% !important;
    padding-left: clamp(16px, 2.5vw, 28px) !important;
    padding-right: clamp(16px, 2.5vw, 28px) !important;
    box-sizing: border-box !important;
}

/* Widen Cart Totals and Cart Grid */
@media (min-width: 1025px) {
    .woocommerce-cart .woocommerce {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 420px !important;
        gap: 32px !important;
    }
    .woocommerce-cart .cart-collaterals {
        width: 100% !important;
        max-width: 420px !important;
    }
}

/* Checkout Page Grid Balance */
@media (min-width: 1025px) {
    .woocommerce-checkout form.checkout {
        gap: 36px !important;
    }
}

/* Homepage Categories Row: Bigger Boxes & Reduced Section Side Margins */
.categories-section .sagmart-container {
    max-width: 1440px !important;
    padding-left: clamp(12px, 2vw, 24px) !important;
    padding-right: clamp(12px, 2vw, 24px) !important;
}

.categories-track {
    gap: clamp(16px, 2.2vw, 32px) !important;
    padding: 20px 4px 34px !important;
}

.category-card-image-wrap {
    width: 165px !important;
    height: 165px !important;
    border-radius: 24px !important;
    padding: 24px !important;
}

.category-card-title,
.category-card-name {
    font-size: 15.5px !important;
    font-weight: 700 !important;
}

@media (max-width: 768px) {
    .category-card-image-wrap {
        width: 130px !important;
        height: 130px !important;
        border-radius: 20px !important;
        padding: 18px !important;
    }
    .category-card-title,
    .category-card-name {
        font-size: 14px !important;
    }
}



