/* Custom Styles for Ghorer Bazar Theme */

/* Force SVG Icon Sizes */
svg {
    max-width: 100%;
    max-height: 100%;
}

header svg,
footer svg,
button svg,
a svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    flex-shrink: 0;
}

.w-6 {
    width: 1.5rem !important;
}

.h-6 {
    height: 1.5rem !important;
}

.w-8 {
    width: 2rem !important;
}

.h-8 {
    height: 2rem !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Bengali Font Optimization */
.font-bengali {
    font-family: 'Hind Siliguri', sans-serif;
    font-feature-settings: "liga" 1, "calt" 1;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

/* Sticky Header Enhancement */
#main-header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: calc(100vh - 80px);
    /* Fill remaining screen height */
    overflow-y: auto;
    /* Enable independent scrolling */
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding-bottom: 150px;
    /* Ensure last items aren't hidden behind bottom nav */
}

/* Search Bar Animation */
#search-bar {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#search-bar.active {
    max-height: 200px;
    opacity: 1;
}

/* Product Card Hover Effects */
.product-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-hover:hover {
    transform: translateY(-4px);
}

/* Quick Add Button Loading State */
.quick-add-btn.loading,
.add-to-cart-btn.loading,
.buy-now-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.quick-add-btn.loading::after,
.add-to-cart-btn.loading::after,
.buy-now-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Success Animation */
.quick-add-btn.success,
.add-to-cart-btn.success,
.buy-now-btn.success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
}

/* Mobile Bottom Navigation Active State */
.mobile-nav-active {
    color: #f39223 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #f39223;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d97e1a;
}

/* Responsive Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Navigation Menu Styling */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

nav ul li a:hover {
    color: #f39223;
}

/* Mobile Menu Styling */
#mobile-menu ul li {
    display: block;
}

#mobile-menu ul li a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Mobile Sub-menu Indentation */
#mobile-menu .sub-menu {
    border-top: none;
    background-color: #fff;
    /* Match main menu color */
}

#mobile-menu .sub-menu li a {
    padding-left: 15px !important;
    /* Slight indentation */
    font-size: 0.95em;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

#mobile-menu .sub-menu .sub-menu li a {
    padding-left: 30px !important;
    /* Deeper indentation for level 2 */
    border-left: 2px solid #e5e7eb;
}

/* WooCommerce Compatibility */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.woocommerce-message {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.woocommerce-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Search Bar */
#search-bar {
    z-index: 9999;
}

#search-bar.hidden {
    display: none !important;
}

/* Print Styles */
@media print {

    header,
    footer,
    .mobile-bottom-nav {
        display: none;
    }
}

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

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #f39223;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-primary {
        background-color: #d97e1a;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================   Single Product Page Styles   =================================== */

/* Quantity Input Styling */
.quantity input.qty {
    width: 80px;
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.quantity input.qty:focus {
    outline: none;
    border-color: #f39223;
    box-shadow: 0 0 0 3px rgba(243, 146, 35, 0.1);
}

/* Product Image Gallery */
.woocommerce-product-gallery {
    position: relative;
}

.woocommerce-product-gallery__image {
    border-radius: 0.5rem;
    overflow: hidden;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sale Flash Badge */
.woocommerce span.onsale {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ef4444;
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.2;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Product Tabs */
.woocommerce-tabs {
    margin-top: 2rem;
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: #f39223;
    border-bottom-color: #f39223;
}

.woocommerce-tabs .panel {
    padding: 2rem 0;
}

/* Mobile Sticky Footer */
.mobile-sticky-footer {
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    bottom: 0 !important;
    z-index: 100 !important;
}

.single-product .mobile-bottom-nav {
    display: none !important;
}

@media (min-width: 768px) {
    .mobile-sticky-footer {
        display: none;
    }
}

/* Quantity Section Styling Refinement */
.quantity-section .qty {
    -moz-appearance: textfield;
    appearance: auto;
}

.quantity-section .qty::-webkit-outer-spin-button,
.quantity-section .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Price Section Badges */
.product-price-section span[class*="bg-"] {
    line-height: 1;
    height: fit-content;
}

/* Sale Flash Badge override */
.woocommerce span.onsale {
    border-radius: 0.25rem !important;
    width: auto !important;
    height: auto !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 10px !important;
    text-transform: uppercase;
}

/* Trust Badges Refinement */
.trust-badges {
    border-top: 1px solid #f3f4f6;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.trust-badge p {
    color: #4b5563;
    font-weight: 500;
}

/* Buttons Refinement */
.action-buttons button {
    text-transform: none;
}

/* Related Products */
.related.products {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.related.products h2 {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 768px) {
    .related.products ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Product Meta */
.product_meta {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #6b7280;
}

.product_meta>span {
    display: block;
    margin-bottom: 0.5rem;
}

.product_meta a {
    color: #f39223;
    text-decoration: none;
}

.product_meta a:hover {
    text-decoration: underline;
}

/* Stock Status */
.stock {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stock.in-stock {
    background-color: #d1fae5;
    color: #065f46;
}

.stock.out-of-stock {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Trust Badges */
.trust-badges .trust-badge {
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.trust-badges .trust-badge:hover {
    transform: translateY(-2px);
}

/* Compatibility Fixes */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Shop Sidebar Refinements */
.sidebar-widgets .widget,
.widget_product_categories,
.widget_layered_nav {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: 2.5rem !important;
}

.sidebar-widgets ul,
.widget_product_categories ul,
.product-categories,
.product-cat-list {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.sidebar-widgets li::before,
.widget_product_categories li::before {
    content: none !important;
}

.sidebar-widgets .widget-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #000;
    text-transform: uppercase;
    border-bottom: none !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 0 !important;
}

.sidebar-widgets .widget-title::after {
    display: none !important;
}

.product-cat-list li,
.widget_product_categories li {
    padding: 0.4rem 0 !important;
    border: none !important;
}

.product-cat-list a,
.widget_product_categories a {
    color: #666 !important;
    font-size: 1rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-cat-list a:hover,
.widget_product_categories a:hover {
    color: #fc8934 !important;
    padding-left: 0 !important;
}

/* Product Toolbar Styling */
.woocommerce-ordering select {
    background-color: transparent !important;
    border: none !important;
    padding: 0 1.5rem 0 0 !important;
    font-size: 0.9rem !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right center !important;
    background-size: 1rem !important;
    outline: none !important;
}

/* Product Card Refinements */
.quick-add-btn {
    border-radius: 0 !important;
}

.quick-add-btn:hover {
    box-shadow: 0 4px 12px rgba(252, 137, 52, 0.2);
}

/* Sticky sidebar adjustment */
@media (min-width: 1024px) {
    aside {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

aside::-webkit-scrollbar {
    width: 4px;
}

aside::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

/* Sidebar Accordion Styles */
.accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    margin-top: 0;
}

.accordion-content.active {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1rem;
}

.accordion-trigger svg {
    transition: transform 0.3s ease;
}

.accordion-trigger.active svg {
    transform: rotate(180deg);
}

/* View Switcher Styles */
#view-switcher .view-btn.active {
    color: #fc8934 !important;
}

/* Custom Sort Dropdown */
.custom-sort-dropdown button {
    font-family: 'Hind Siliguri', sans-serif;
}

.sort-option {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.875rem;
}

.custom-sort-dropdown:hover #sort-options-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#product-grid-container.view-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#product-grid-container.view-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 768px) {
    #product-grid-container.view-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

#product-grid-container.view-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 1024px) {
    #product-grid-container.view-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

#product-grid-container.view-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 1280px) {
    #product-grid-container.view-grid-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

#product-grid-container.view-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 1280px) {
    #product-grid-container.view-grid-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
}

/* List View Styles */
#product-grid-container.view-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

@media (min-width: 768px) {
    #product-grid-container.view-list .product-card-container {
        display: flex !important;
        flex-direction: row !important;
        text-align: left !important;
        align-items: center !important;
        border: 1px solid #dde0e5 !important;
    }

    #product-grid-container.view-list .product-card-container>div:first-child {
        width: 250px !important;
        flex-shrink: 0 !important;
        border-right: 1px solid #dde0e5 !important;
    }

    #product-grid-container.view-list .product-card-container>div:last-child {
        flex-grow: 1 !important;
        text-align: left !important;
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    #product-grid-container.view-list .product-card-container .quick-add-btn,
    #product-grid-container.view-list .product-card-container .add-to-cart-btn,
    #product-grid-container.view-list .product-card-container .buy-now-btn {
        width: fit-content !important;
        min-width: 200px !important;
    }
}

/* Custom Price Range Slider */
.custom-price-range {
    position: absolute;
    width: 100%;
    height: 0;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
}

.custom-price-range::-webkit-slider-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: black;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Mini Cart Input Styles */
.mini-cart-qty-input::-webkit-outer-spin-button,
.mini-cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mini-cart-qty-input {
    -moz-appearance: textfield;
}

/* Redesigned Mini Cart Styles */
.quantity-control {
    background-color: #f3f4f6;
    /* Gray-100 */
}

.mini-cart-qty-btn {
    transition: color 0.2s ease;
}

.mini-cart-qty-btn:hover {
    color: #000;
}

.cart-item-row {
    transition: opacity 0.3s ease, height 0.3s ease;
}

.remove-cart-item {
    text-decoration-color: #d1d5db;
    /* Gray-300 */
}

.remove-cart-item:hover {
    text-decoration-color: #ef4444;
    /* Red-500 */
}

.custom-price-range::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: black;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#price-min-range {
    z-index: 10;
}

#price-max-range {
    z-index: 11;
}

/* Stock filter checkbox styling */
.stock-filter-checkbox {
    cursor: pointer;
}

.stock-filter-checkbox:checked {
    background-color: #fc8934;
    border-color: #fc8934;
}

/* Sidebar Category List Improvements */
.product-cat-list a {
    font-family: 'Hind Siliguri', sans-serif !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

.product-cat-list a:hover {
    padding-left: 1rem !important;
}

.product-cat-list a.bg-orange-50 {
    background-color: #fffaf7 !important;
    border-left: 3px solid #fc8934 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding-left: 0.75rem !important;
}

.product-cat-list a:focus,
.product-cat-list a:active,
.product-cat-list a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Main Cart Page Styles */
.cart-page-wrapper .quantity-control {
    border: 1px solid #e5e7eb;
}

.cart-page-wrapper .cart_totals table {
    width: 100%;
    margin-bottom: 0;
}

.cart-page-wrapper .cart_totals th,
.cart-page-wrapper .cart_totals td {
    border-top: 1px solid #f3f4f6;
    padding: 0.75rem 0;
    vertical-align: middle;
}

.cart-page-wrapper .cart_totals th {
    font-weight: normal;
    text-align: left;
    color: #4b5563;
}

.cart-page-wrapper .cart_totals td {
    text-align: right;
    font-weight: 600;
    color: #111827;
}

/* Coupon Input */
.coupon input.input-text {
    width: 100% !important;
    min-width: 0 !important;
}

/* Sticky Sidebar Offset */
@media (min-width: 1024px) {
    .cart-page-wrapper .sticky {
        top: 100px;
        /* Adjust based on header height */
    }
}


/* Sticky Cart Sidebar */
@media (min-width: 1024px) {
    .cart-page-wrapper .lg\:col-span-1 {
        position: sticky;
        top: 2rem;
        /* Consistent spacing from top */
        height: fit-content;
        /* Required for sticky to work if parent is taller */
        align-self: start;
    }
}


/* Force Cart Totals Full Width */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
    float: none !important;
    width: 100% !important;
    text-align: left !important;
}

.cart-page-wrapper .cart_totals table {
    width: 100% !important;
    border-collapse: collapse;
}

.cart-page-wrapper .cart_totals th,
.cart-page-wrapper .cart_totals td {
    padding: 15px 0;
}


/* Fixed Cart Design Stability */
.woocommerce-cart-form button[name='update_cart'] {
    display: none !important;
}

/* Premium Shipping UI Update */
ul#shipping_method {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

ul#shipping_method li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    margin: 0;
    cursor: pointer;
}

ul#shipping_method li input[type='radio'] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #dde0e5;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

ul#shipping_method li input[type='radio']:checked {
    border-color: #fc8934;
}

ul#shipping_method li input[type='radio']:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #fc8934;
    border-radius: 50%;
}

ul#shipping_method li label {
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

ul#shipping_method li label bdi {
    font-weight: 700;
    color: #1a202c;
}

.shipping-section {
    padding-bottom: 20px;
}

.woocommerce-shipping-totals h3 {
    display: none;
    /* Hide standard WC heading in totals sidebar */
}


/* ===================================   Checkout Popup Styles   =================================== */

#checkout-popup-content .woocommerce-checkout {
    display: flex;
    flex-direction: column;
}

#checkout-popup-content .col2-set {
    width: 100%;
    float: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#checkout-popup-content .col-1,
#checkout-popup-content .col-2 {
    width: 100%;
    float: none;
    flex: none;
    max-width: 100%;
}

/* Hide unneeded elements in popup to simplify */
#checkout-popup-content .woocommerce-additional-fields h3 {
    margin-top: 1rem;
    font-size: 1rem;
}

#checkout-popup-content #order_review_heading {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid #f39223;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Styled Inputs in Checkout */
#checkout-popup-content input.input-text,
#checkout-popup-content select,
#checkout-popup-content textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}

/* Make Order Notes Full Width */
#checkout-popup-content #order_comments_field {
    grid-column: span 2;
    width: 100%;
    clear: both;
    float: none;
}

#checkout-popup-content #order_comments {
    min-height: 120px;
    width: 100% !important;
}

#checkout-popup-content input.input-text:focus,
#checkout-popup-content select:focus,
#checkout-popup-content textarea:focus {
    border-color: #f39223;
    outline: none;
    box-shadow: 0 0 0 1px #f39223;
}

/* Order Review Table */
#checkout-popup-content .woocommerce-checkout-review-order-table {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    margin-top: 1rem;
}

#checkout-popup-content .woocommerce-checkout-review-order-table th,
#checkout-popup-content .woocommerce-checkout-review-order-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

#checkout-popup-content .woocommerce-checkout-review-order-table th {
    background-color: #f9fafb;
    /* Gray-50 */
    color: #374151;
    font-weight: 600;
}

#checkout-popup-content .woocommerce-checkout-review-order-table tr:last-child th,
#checkout-popup-content .woocommerce-checkout-review-order-table tr:last-child td {
    border-bottom: none;
}

/* Coupon Form Styling in Popup */
/* Coupon Form Styling in Popup */
#checkout-popup-content .checkout_coupon {
    display: none;
    /* Hidden by default */
    gap: 10px;
    align-items: center;
    border: 1px dashed #f39223;
    padding: 1rem;
    background-color: #fffaf0;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

#checkout-popup-content .checkout_coupon p {
    margin: 0;
    float: none !important;
}

/* Input Wrapper (First Paragraph) */
#checkout-popup-content .checkout_coupon p.form-row-first {
    flex-grow: 1;
    width: auto !important;
}

/* Button Wrapper (Last Paragraph) */
#checkout-popup-content .checkout_coupon p.form-row-last {
    width: auto !important;
    flex-shrink: 0;
}

#checkout-popup-content .checkout_coupon input.input-text {
    width: 100% !important;
    border: 1px solid #ddd;
    padding: 0.75rem;
    height: 48px !important;
    box-sizing: border-box;
    margin: 0 !important;
}

#checkout-popup-content .checkout_coupon button[name="apply_coupon"] {
    background-color: #f39223;
    color: white;
    border: none;
    padding: 0 1.5rem;
    height: 48px !important;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    width: auto !important;
    line-height: 48px;
    display: inline-block;
    flex-shrink: 0;
    margin: 0 !important;
}

#checkout-popup-content .checkout_coupon button[name="apply_coupon"]:hover {
    background-color: #d97e1a;
}

/* Shipping Methods Styling */
#checkout-popup-content .woocommerce-checkout-review-order-table tr.shipping th {
    vertical-align: top;
    padding-top: 1.5rem;
}

#checkout-popup-content .woocommerce-checkout-review-order-table ul#shipping_method {
    list-style: none;
    margin: 0;
    padding: 0;
}

#checkout-popup-content .woocommerce-checkout-review-order-table ul#shipping_method li {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background-color: white;
    transition: all 0.2s;
}

#checkout-popup-content .woocommerce-checkout-review-order-table ul#shipping_method li:hover {
    border-color: #f39223;
}

#checkout-popup-content .woocommerce-checkout-review-order-table ul#shipping_method li input[type="radio"] {
    margin-right: 1rem;
    accent-color: #f39223;
    width: 1.25rem;
    height: 1.25rem;
}

#checkout-popup-content .woocommerce-checkout-review-order-table ul#shipping_method li label {
    flex-grow: 1;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

#checkout-popup-content .woocommerce-checkout-review-order-table ul#shipping_method li .amount {
    font-weight: 700;
    color: #111827;
}

/* Payment Methods */
#checkout-popup-content #payment {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
}

#checkout-popup-content #place_order {
    width: 100%;
    background-color: #f39223;
    color: black;
    font-weight: 700;
    padding: 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    float: none;
    margin-top: 1rem;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 1.125rem;
}

#checkout-popup-content #place_order:hover {
    background-color: #d97e1a;
}

/* Coupon Messages in Popup */
#checkout-popup-content .checkout_coupon {
    flex-wrap: wrap !important;
}

/* Hide all top-level or other messages in popup to prevent duplicates */
/* We ONLY want to show messages inside .checkout_coupon */
#checkout-popup-content .woocommerce-error:not(.checkout_coupon .woocommerce-error),
#checkout-popup-content .woocommerce-message:not(.checkout_coupon .woocommerce-message) {
    display: none !important;
}

#checkout-popup-content .checkout_coupon .woocommerce-message,
#checkout-popup-content .checkout_coupon .woocommerce-error {
    background-color: #def7ec;
    color: #03543f;
    border: 1px solid #84e1bc;
    padding: 1rem 1rem 1rem 3rem;
    /* Padding for Icon */
    margin-bottom: 0;
    border-radius: 0.5rem;
    width: 100%;
    flex-basis: 100%;
    margin-top: 1rem;
    order: 10;
    text-align: left;
    font-size: 0.9rem;
    position: relative;
    display: block !important;
}

#checkout-popup-content .checkout_coupon .woocommerce-error {
    background-color: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

/* Position Pseudo Element Icon */
#checkout-popup-content .checkout_coupon .woocommerce-message::before,
#checkout-popup-content .checkout_coupon .woocommerce-error::before {
    top: 50%;
    transform: translateY(-50%);
    left: 1rem;
    position: absolute;
    /* Default WC icon handling relies on font-family */
}

#checkout-popup-content .woocommerce-error li {
    list-style: none;
    margin: 0;
}