/**
 * Cart and Checkout Page Styles - Opanije Theme
 * Modern, responsive design for WooCommerce cart and checkout pages
 *
 * IMPORTANT: This CSS requires body_class() in header.php to work properly!
 * WooCommerce adds body classes like 'woocommerce-cart' and 'woocommerce-checkout'
 * which are essential for the modern hero section backgrounds and styling.
 */

/* CSS Variables for easier maintenance */
:root {
    --opanije-dark: #2B2823;
    --opanije-gold: #d8a81b;
    --opanije-gold-dark: #b7780d;
    --opanije-light-bg: #F7F7F7;
    --opanije-express-bg: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    --opanije-border-radius: 12px;
    --opanije-border-radius-small: 8px;
    --opanije-border-radius-pill: 50px;
}

/* Container Improvements */
.woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Content Area - Cart & Checkout */
body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce,
body.woocommerce-cart form,
body.woocommerce-checkout form {
    position: relative;
    z-index: 1;
}

/* Main content wrapper with card effect */
body.woocommerce-cart .woocommerce > form,
body.woocommerce-cart .cart-collaterals {
    background: #ffffff;
    border-radius: var(--opanije-border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 35px;
    margin-bottom: 30px;
}

/* ===================================
   EXPRESS CHECKOUT SECTION
   =================================== */

/* Express Checkout Info Banner */
.opanije-express-checkout-info {
    background: var(--opanije-express-bg);
    border: 2px solid var(--opanije-gold);
    border-radius: var(--opanije-border-radius);
    padding: 25px 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(216, 168, 27, 0.1);
    overflow: visible;
}

/* Express checkout wrapper - ensure proper container for Stripe buttons */
.woocommerce-checkout .woocommerce-checkout-review-order,
.woocommerce-cart .cart-collaterals {
    overflow: visible !important;
}

.express-checkout-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: var(--opanije-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.express-checkout-content h3 {
    color: var(--opanije-dark);
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0 0 8px 0;
    font-family: 'Montserrat', sans-serif;
}

.express-checkout-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Express Checkout Banner */
@media (max-width: 768px) {
    .opanije-express-checkout-info {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .express-checkout-content h3 {
        font-size: 1.1rem;
    }

    .express-checkout-content p {
        font-size: 0.9rem;
    }
}

/* ===================================
   CART PAGE HEADER
   =================================== */

.cart-page-header {
    background: linear-gradient(135deg, #2B2823 0%, #3d3834 100%);
    padding: 40px 0 50px;
    margin-bottom: 50px;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cart-header-content {
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.cart-logo {
    flex-shrink: 0;
}

.cart-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.1));
}

.cart-header-text {
    text-align: center;
}

.cart-header-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.cart-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-style: italic;
}

/* Cart Breadcrumbs */
.cart-breadcrumbs {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.breadcrumb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.breadcrumb-item.active {
    opacity: 1;
}

.breadcrumb-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.breadcrumb-item.active .breadcrumb-number {
    background: #d8a81b;
    border-color: #d8a81b;
    color: #2B2823;
}

.breadcrumb-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.breadcrumb-divider {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin-top: -25px;
}

/* Cart & Camp Info Styles */
.camp-info-row td {
    background: #fff9e6;
}

.camp-info-row h4 {
    font-family: 'Montserrat', sans-serif;
}

.woocommerce-cart-form__cart-item .wc-item-meta {
    font-size: 0.9rem;
}

.woocommerce-cart-form__cart-item .wc-item-meta strong {
    color: var(--opanije-gold);
}

/* ===================================
   CART PAGE - CLEAN PROFESSIONAL STYLE
   =================================== */

body.woocommerce-cart {
    background: #f8f9fa;
}

/* Cart Hero Section - Clean Design */
body.woocommerce-cart .entry-header {
    background: linear-gradient(135deg, #2B2823 0%, #3a3633 100%);
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Cart Title - Readable and Clean */
body.woocommerce-cart .entry-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #ffffff;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.02em;
}

body.woocommerce-cart .entry-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--opanije-gold);
    margin: 15px auto 0;
}

/* Cart Subtitle - Readable White Text */
body.woocommerce-cart .entry-header .cart-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    opacity: 0.9;
    margin-top: 15px;
    font-weight: 400;
    line-height: 1.5;
}

/* Progress Steps - Clean and Readable */
.cart-progress-steps {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.progress-step.active {
    background: var(--opanije-gold);
    border-color: var(--opanije-gold);
    color: var(--opanije-dark);
    box-shadow: 0 4px 12px rgba(216, 168, 27, 0.3);
}

.progress-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.progress-step.active .progress-step-number {
    background: var(--opanije-dark);
    color: var(--opanije-gold);
}

/* ===================================
   CHECKOUT PAGE - CLEAN PROFESSIONAL STYLE
   =================================== */

body.woocommerce-checkout {
    background: #f8f9fa;
}

/* Checkout Hero Section - Clean Design */
body.woocommerce-checkout .entry-header {
    background: linear-gradient(135deg, #2B2823 0%, #3a3633 100%);
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Checkout Title - Readable and Clean */
body.woocommerce-checkout .entry-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #ffffff;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.02em;
}

body.woocommerce-checkout .entry-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--opanije-gold);
    margin: 15px auto 0;
}

/* Checkout Subtitle - Readable White Text */
body.woocommerce-checkout .entry-header .checkout-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    opacity: 0.9;
    margin-top: 15px;
    font-weight: 400;
    line-height: 1.5;
}

/* Mobile Title Sizing */
@media (max-width: 768px) {
    body.woocommerce-cart .entry-title,
    body.woocommerce-checkout .entry-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    body.woocommerce-cart .entry-title,
    body.woocommerce-checkout .entry-title {
        font-size: 1.5rem;
    }
}

/* ===================================
   CART TABLE - MODERN CARD-BASED DESIGN
   Best practices: Visual hierarchy, better spacing, clear actions
   =================================== */

.woocommerce table.shop_table {
    border-radius: var(--opanije-border-radius);
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    background: #ffffff;
}

/* Table Header - Professional & Clear */
.woocommerce table.shop_table th {
    background: linear-gradient(135deg, var(--opanije-dark) 0%, #3a3633 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 20px;
    border: none;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.woocommerce table.shop_table th.product-name {
    text-align: left;
}

/* Table Body Rows - Enhanced Spacing */
.woocommerce table.shop_table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce table.shop_table tbody tr:hover {
    background-color: #f9f9f9;
}

.woocommerce table.shop_table td {
    padding: 25px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    text-align: center;
}

.woocommerce table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Thumbnail - Polished Look */
.woocommerce table.shop_table .product-thumbnail {
    width: 120px;
}

.woocommerce table.shop_table .product-thumbnail img {
    border-radius: var(--opanije-border-radius-small);
    max-width: 100px;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.woocommerce table.shop_table .product-thumbnail img:hover {
    transform: scale(1.05);
}

/* Product Name - Typography & Link Styling */
.woocommerce table.shop_table .product-name {
    text-align: left;
}

.woocommerce table.shop_table .product-name a {
    color: var(--opanije-dark);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

@media (max-width: 768px) {
    .woocommerce table.shop_table .product-name a {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .woocommerce table.shop_table .product-name a {
        font-size: 0.95rem;
    }
}

.woocommerce table.shop_table .product-name a:hover {
    color: var(--opanije-gold);
}

/* Product Price & Subtotal - Prominent Display */
.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal {
    color: var(--opanije-gold-dark);
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 768px) {
    .woocommerce table.shop_table .product-price,
    .woocommerce table.shop_table .product-subtotal {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .woocommerce table.shop_table .product-price,
    .woocommerce table.shop_table .product-subtotal {
        font-size: 1rem;
    }
}

/* Remove Button - Clear & Accessible */
.woocommerce table.shop_table .product-remove {
    width: 60px;
}

.woocommerce table.shop_table .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #999;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.woocommerce table.shop_table .product-remove a:hover {
    background: #fee;
    color: #e74c3c;
    border-color: #e74c3c;
    transform: rotate(90deg);
}

/* ===================================
   RESPONSIVE TABLE - shop_table_responsive
   Mobile-optimized card layout
   =================================== */

@media (max-width: 768px) {
    /* Hide table header on mobile */
    .woocommerce table.shop_table_responsive thead {
        display: none;
    }

    /* Transform table rows into cards */
    .woocommerce table.shop_table_responsive tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 2px solid #e8e8e8;
        border-radius: var(--opanije-border-radius);
        padding: 20px;
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .woocommerce table.shop_table_responsive tbody tr:hover {
        background: #ffffff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-color: var(--opanije-gold);
    }

    /* Stack table cells vertically */
    .woocommerce table.shop_table_responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        border: none;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .woocommerce table.shop_table_responsive td:last-child {
        border-bottom: none;
    }

    /* Add labels before each cell */
    .woocommerce table.shop_table_responsive td::before {
        content: attr(data-title);
        font-weight: 700;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.85rem;
        color: var(--opanije-dark);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex: 0 0 40%;
    }

    /* Remove label styling (no data-title) */
    .woocommerce table.shop_table_responsive .product-remove::before {
        display: none;
    }

    /* Position remove button at top right */
    .woocommerce table.shop_table_responsive .product-remove {
        position: absolute;
        top: 15px;
        right: 15px;
        padding: 0;
        width: auto;
    }

    /* Make product row relative for absolute positioning */
    .woocommerce table.shop_table_responsive tbody tr {
        position: relative;
        padding-top: 60px;
    }

    /* Product thumbnail - larger on mobile cards */
    .woocommerce table.shop_table_responsive .product-thumbnail {
        justify-content: flex-start;
        margin-bottom: 15px;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 15px;
    }

    .woocommerce table.shop_table_responsive .product-thumbnail::before {
        display: none;
    }

    .woocommerce table.shop_table_responsive .product-thumbnail img {
        max-width: 120px;
        height: auto;
    }

    /* Product name - full width */
    .woocommerce table.shop_table_responsive .product-name {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .woocommerce table.shop_table_responsive .product-name::before {
        display: none;
    }

    .woocommerce table.shop_table_responsive .product-name a {
        font-size: 1.15rem;
        font-weight: 800;
    }

    /* Quantity input - better mobile UX */
    .woocommerce table.shop_table_responsive .product-quantity {
        align-items: center;
    }

    .woocommerce table.shop_table_responsive .product-quantity .quantity {
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .woocommerce table.shop_table_responsive tbody tr {
        padding: 15px;
        padding-top: 55px;
    }

    .woocommerce table.shop_table_responsive td::before {
        font-size: 0.8rem;
        flex: 0 0 45%;
    }

    .woocommerce table.shop_table_responsive .product-thumbnail img {
        max-width: 100px;
    }
}

/* Quantity Input */
.woocommerce .quantity {
    position: relative;
}

.woocommerce-cart .quantity input,
.woocommerce-checkout .quantity input {
    border: 2px solid #e0e0e0;
    border-radius: var(--opanije-border-radius-pill);
    padding: 10px 15px;
    width: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.woocommerce-cart .quantity input:focus,
.woocommerce-checkout .quantity input:focus {
    border-color: var(--opanije-gold);
    outline: none;
}

/* Update Cart Button */
.woocommerce-cart button[name="update_cart"] {
    background-color: var(--opanije-dark);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: var(--opanije-border-radius-pill);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-cart button[name="update_cart"]:hover {
    background-color: var(--opanije-gold);
    color: var(--opanije-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 40, 35, 0.3);
}

.woocommerce-cart button[name="update_cart"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart Actions */
.woocommerce .cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

/* Coupon Form */
.woocommerce .coupon {
    display: flex;
    gap: 10px;
    align-items: center;
}

.woocommerce-cart .coupon input[type="text"] {
    border: 2px solid #e0e0e0;
    border-radius: var(--opanije-border-radius-pill);
    padding: 12px 20px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.woocommerce-cart .coupon input[type="text"]:focus {
    border-color: var(--opanije-gold);
    outline: none;
}

.woocommerce-cart .coupon button {
    background-color: var(--opanije-dark);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: var(--opanije-border-radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-cart .coupon button:hover {
    background-color: var(--opanije-gold);
    color: var(--opanije-dark);
}

/* ===================================
   CART TOTALS & ORDER REVIEW - IMPROVED UX/UI
   Best practices: Clear hierarchy, visual grouping, accessible spacing
   =================================== */

/* Cart Totals Container */
.cart-collaterals {
    background: #ffffff;
    padding: 0;
    border-radius: var(--opanije-border-radius);
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Cart Totals Header */
.cart-collaterals h2,
.cart_totals h2 {
    color: #ffffff;
    background: linear-gradient(135deg, var(--opanije-dark) 0%, #3a3633 100%);
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0;
    padding: 25px 30px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--opanije-gold);
}

@media (max-width: 768px) {
    .cart-collaterals h2,
    .cart_totals h2 {
        font-size: 1.3rem;
        padding: 20px 25px;
    }
}

@media (max-width: 480px) {
    .cart-collaterals h2,
    .cart_totals h2 {
        font-size: 1.1rem;
        padding: 18px 20px;
    }
}

/* Cart Totals Table */
.cart-collaterals .shop_table,
.cart_totals .shop_table {
    background: #ffffff;
    border-radius: 0;
    padding: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

/* Table Rows - Improved Spacing & Visual Separation */
.cart-collaterals .shop_table tr,
.cart_totals .shop_table tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s ease;
}

.cart-collaterals .shop_table tr:hover,
.cart_totals .shop_table tr:hover {
    background-color: #f9f9f9;
}

.cart-collaterals .shop_table tr:last-child,
.cart_totals .shop_table tr:last-child {
    border-bottom: none;
}

/* Table Cells - Better Typography & Spacing */
.cart-collaterals .shop_table th,
.cart-collaterals .shop_table td,
.cart_totals .shop_table th,
.cart_totals .shop_table td {
    padding: 20px 30px;
    font-family: 'Lato', sans-serif;
    vertical-align: middle;
}

.cart-collaterals .shop_table th,
.cart_totals .shop_table th {
    font-weight: 600;
    font-size: 1rem;
    color: #555;
    text-align: left;
    width: 50%;
}

.cart-collaterals .shop_table td,
.cart_totals .shop_table td {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--opanije-dark);
    text-align: right;
    width: 50%;
}

/* Subtotal Row - Standard Styling */
.cart-collaterals .cart-subtotal th,
.cart-collaterals .cart-subtotal td,
.cart_totals .cart-subtotal th,
.cart_totals .cart-subtotal td {
    font-size: 1.05rem;
    color: #444;
}

/* Shipping Row - Information Styling */
.cart-collaterals .woocommerce-shipping-totals th,
.cart-collaterals .woocommerce-shipping-totals td,
.cart_totals .woocommerce-shipping-totals th,
.cart_totals .woocommerce-shipping-totals td {
    font-size: 1rem;
    color: #555;
}

/* Order Total Row - Prominent & Eye-Catching */
.cart-collaterals .order-total,
.cart_totals .order-total {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border-top: 2px solid var(--opanije-gold);
    border-bottom: 2px solid var(--opanije-gold);
}

.cart-collaterals .order-total th,
.cart-collaterals .order-total td,
.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--opanije-gold-dark);
    padding: 25px 30px;
    font-family: 'Montserrat', sans-serif;
}

.cart-collaterals .order-total .woocommerce-Price-amount,
.cart_totals .order-total .woocommerce-Price-amount {
    font-size: 1.8rem;
    color: var(--opanije-gold-dark);
}

/* Tax Row - Subtle */
.cart-collaterals .tax-rate th,
.cart-collaterals .tax-rate td,
.cart_totals .tax-rate th,
.cart_totals .tax-rate td {
    font-size: 0.95rem;
    color: #666;
}

@media (max-width: 768px) {
    .cart-collaterals .shop_table th,
    .cart-collaterals .shop_table td,
    .cart_totals .shop_table th,
    .cart_totals .shop_table td {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .cart-collaterals .order-total th,
    .cart-collaterals .order-total td,
    .cart_totals .order-total th,
    .cart_totals .order-total td {
        font-size: 1.4rem;
        padding: 20px;
    }

    .cart-collaterals .order-total .woocommerce-Price-amount,
    .cart_totals .order-total .woocommerce-Price-amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cart-collaterals .shop_table th,
    .cart-collaterals .shop_table td,
    .cart_totals .shop_table th,
    .cart_totals .shop_table td {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .cart-collaterals .order-total th,
    .cart-collaterals .order-total td,
    .cart_totals .order-total th,
    .cart_totals .order-total td {
        font-size: 1.2rem;
        padding: 18px 16px;
    }

    .cart-collaterals .order-total .woocommerce-Price-amount,
    .cart_totals .order-total .woocommerce-Price-amount {
        font-size: 1.3rem;
    }
}

/* Proceed to Checkout Button - Enhanced CTA */
.woocommerce .wc-proceed-to-checkout {
    padding: 30px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-top: 1px solid #e8e8e8;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background: linear-gradient(135deg, var(--opanije-gold) 0%, #c99617 100%);
    color: var(--opanije-dark);
    border: none;
    padding: 20px 50px;
    border-radius: var(--opanije-border-radius-pill);
    font-weight: 800;
    font-size: 1.3rem;
    text-align: center;
    display: block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(216, 168, 27, 0.3);
    position: relative;
    overflow: hidden;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover::before {
    left: 100%;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    background: linear-gradient(135deg, var(--opanije-gold-dark) 0%, #9a6209 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(216, 168, 27, 0.5);
}

/* ===================================
   CHECKOUT ORDER REVIEW - IMPROVED UX/UI
   Best practices: Card design, clear pricing breakdown, trust elements
   =================================== */

/* Order Review Container */
#order_review,
.woocommerce-checkout-review-order {
    background: #ffffff;
    border-radius: var(--opanije-border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    overflow: hidden;
}

/* Order Review Header */
#order_review h3,
.woocommerce-checkout-review-order h3 {
    color: #ffffff;
    background: linear-gradient(135deg, var(--opanije-dark) 0%, #3a3633 100%);
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0;
    padding: 25px 30px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--opanije-gold);
}

/* Order Review Table - Products List */
#order_review table.shop_table,
.woocommerce-checkout-review-order table.shop_table {
    background: #ffffff;
    border-radius: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

/* Table Header */
#order_review .shop_table thead,
.woocommerce-checkout-review-order .shop_table thead {
    background: #f8f9fa;
}

#order_review .shop_table thead th,
.woocommerce-checkout-review-order .shop_table thead th {
    padding: 18px 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--opanije-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e8e8e8;
}

/* Product Rows */
#order_review .shop_table tbody tr,
.woocommerce-checkout-review-order .shop_table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s ease;
}

#order_review .shop_table tbody tr:hover,
.woocommerce-checkout-review-order .shop_table tbody tr:hover {
    background-color: #f9f9f9;
}

#order_review .shop_table tbody td,
.woocommerce-checkout-review-order .shop_table tbody td {
    padding: 20px 30px;
    font-family: 'Lato', sans-serif;
    vertical-align: middle;
}

/* Product Name */
#order_review .shop_table .product-name,
.woocommerce-checkout-review-order .shop_table .product-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--opanije-dark);
}

#order_review .shop_table .product-name strong,
.woocommerce-checkout-review-order .shop_table .product-name strong {
    display: block;
    margin-bottom: 5px;
}

/* Product Meta (variations, etc.) */
#order_review .shop_table .product-name .wc-item-meta,
.woocommerce-checkout-review-order .shop_table .product-name .wc-item-meta {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
}

#order_review .shop_table .product-name .wc-item-meta strong,
.woocommerce-checkout-review-order .shop_table .product-name .wc-item-meta strong {
    color: var(--opanije-gold-dark);
    font-weight: 600;
}

/* Product Price */
#order_review .shop_table .product-total,
.woocommerce-checkout-review-order .shop_table .product-total {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--opanije-gold-dark);
    text-align: right;
}

/* Cart Totals in Order Review */
#order_review .shop_table tfoot,
.woocommerce-checkout-review-order .shop_table tfoot {
    background: #f8f9fa;
}

#order_review .shop_table tfoot tr,
.woocommerce-checkout-review-order .shop_table tfoot tr {
    border-bottom: 1px solid #e8e8e8;
}

#order_review .shop_table tfoot tr:last-child,
.woocommerce-checkout-review-order .shop_table tfoot tr:last-child {
    border-bottom: none;
}

#order_review .shop_table tfoot th,
#order_review .shop_table tfoot td,
.woocommerce-checkout-review-order .shop_table tfoot th,
.woocommerce-checkout-review-order .shop_table tfoot td {
    padding: 20px 30px;
    font-family: 'Lato', sans-serif;
}

#order_review .shop_table tfoot th,
.woocommerce-checkout-review-order .shop_table tfoot th {
    font-weight: 600;
    font-size: 1rem;
    color: #555;
    text-align: left;
}

#order_review .shop_table tfoot td,
.woocommerce-checkout-review-order .shop_table tfoot td {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--opanije-dark);
    text-align: right;
}

/* Subtotal Row */
#order_review .cart-subtotal th,
#order_review .cart-subtotal td,
.woocommerce-checkout-review-order .cart-subtotal th,
.woocommerce-checkout-review-order .cart-subtotal td {
    font-size: 1.05rem;
    color: #444;
}

/* Shipping Row */
#order_review .shipping th,
#order_review .shipping td,
.woocommerce-checkout-review-order .shipping th,
.woocommerce-checkout-review-order .shipping td {
    font-size: 1rem;
}

#order_review .shipping td label,
.woocommerce-checkout-review-order .shipping td label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Order Total Row - Most Prominent */
#order_review .order-total,
.woocommerce-checkout-review-order .order-total {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border-top: 3px solid var(--opanije-gold);
    border-bottom: 3px solid var(--opanije-gold);
}

#order_review .order-total th,
#order_review .order-total td,
.woocommerce-checkout-review-order .order-total th,
.woocommerce-checkout-review-order .order-total td {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--opanije-gold-dark);
    padding: 28px 30px;
    font-family: 'Montserrat', sans-serif;
}

#order_review .order-total .woocommerce-Price-amount,
.woocommerce-checkout-review-order .order-total .woocommerce-Price-amount {
    font-size: 2rem;
    color: var(--opanije-gold-dark);
}

/* Payment Methods Section */
#order_review #payment,
.woocommerce-checkout-review-order #payment {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #e8e8e8;
}

/* Mobile Responsiveness for Order Review */
@media (max-width: 768px) {
    #order_review h3,
    .woocommerce-checkout-review-order h3 {
        font-size: 1.3rem;
        padding: 20px 25px;
    }

    #order_review .shop_table thead th,
    .woocommerce-checkout-review-order .shop_table thead th {
        padding: 15px 20px;
        font-size: 0.85rem;
    }

    #order_review .shop_table tbody td,
    #order_review .shop_table tfoot th,
    #order_review .shop_table tfoot td,
    .woocommerce-checkout-review-order .shop_table tbody td,
    .woocommerce-checkout-review-order .shop_table tfoot th,
    .woocommerce-checkout-review-order .shop_table tfoot td {
        padding: 16px 20px;
        font-size: 1rem;
    }

    #order_review .order-total th,
    #order_review .order-total td,
    .woocommerce-checkout-review-order .order-total th,
    .woocommerce-checkout-review-order .order-total td {
        font-size: 1.4rem;
        padding: 22px 20px;
    }

    #order_review .order-total .woocommerce-Price-amount,
    .woocommerce-checkout-review-order .order-total .woocommerce-Price-amount {
        font-size: 1.6rem;
    }

    .woocommerce .wc-proceed-to-checkout {
        padding: 20px;
    }

    .woocommerce .wc-proceed-to-checkout a.checkout-button {
        padding: 18px 40px;
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    #order_review h3,
    .woocommerce-checkout-review-order h3 {
        font-size: 1.1rem;
        padding: 18px 20px;
    }

    #order_review .shop_table thead,
    .woocommerce-checkout-review-order .shop_table thead {
        display: none;
    }

    #order_review .shop_table tbody tr,
    #order_review .shop_table tfoot tr,
    .woocommerce-checkout-review-order .shop_table tbody tr,
    .woocommerce-checkout-review-order .shop_table tfoot tr {
        display: flex;
        flex-direction: column;
        padding: 15px;
        border: 1px solid #e8e8e8;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    #order_review .shop_table tbody td,
    #order_review .shop_table tfoot th,
    #order_review .shop_table tfoot td,
    .woocommerce-checkout-review-order .shop_table tbody td,
    .woocommerce-checkout-review-order .shop_table tfoot th,
    .woocommerce-checkout-review-order .shop_table tfoot td {
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
    }

    #order_review .shop_table tbody td::before,
    .woocommerce-checkout-review-order .shop_table tbody td::before {
        content: attr(data-title);
        font-weight: 700;
        color: var(--opanije-dark);
        flex: 1;
    }

    #order_review .order-total,
    .woocommerce-checkout-review-order .order-total {
        margin-top: 15px;
    }

    #order_review .order-total th,
    #order_review .order-total td,
    .woocommerce-checkout-review-order .order-total th,
    .woocommerce-checkout-review-order .order-total td {
        font-size: 1.2rem;
        padding: 18px 16px;
    }

    #order_review .order-total .woocommerce-Price-amount,
    .woocommerce-checkout-review-order .order-total .woocommerce-Price-amount {
        font-size: 1.4rem;
    }

    .woocommerce .wc-proceed-to-checkout {
        padding: 16px;
    }

    .woocommerce .wc-proceed-to-checkout a.checkout-button {
        padding: 16px 35px;
        font-size: 1.05rem;
        letter-spacing: 0.5px;
    }
}


/* Trust Badges - Clean and Readable */
.checkout-trust-badges {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
}

.trust-badge i {
    color: var(--opanije-gold);
    font-size: 1.1rem;
}

/* Override WooCommerce default column layout - Make checkout forms full-width */
/* Also override Bootstrap's .col-1 and .col-2 which conflict with WooCommerce */
.woocommerce-checkout .col2-set {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2,
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    flex: none !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Ensure checkout form container is full-width */
.woocommerce-checkout #customer_details {
    width: 100% !important;
    max-width: 100% !important;
}

/* Override any WooCommerce default form width constraints */
.woocommerce-checkout form.checkout {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order {
    width: 100% !important;
    max-width: 100% !important;
}

/* Remove any default WooCommerce form-row width constraints */
.woocommerce-checkout .form-row {
    box-sizing: border-box !important;
}

/* Billing Fields Container */
.woocommerce-checkout .woocommerce-billing-fields {
    background: var(--opanije-light-bg);
    padding: 35px;
    border-radius: var(--opanije-border-radius);
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100% !important;
    max-width: 100% !important;
}

/* Grid layout for billing fields - Override WooCommerce defaults */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Reset WooCommerce default form-row styles to work with grid */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    clear: none !important;
}

/* Ensure wrapper doesn't constrain the fields */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper {
    width: 100% !important;
    display: block !important;
}

/* Ensure all input fields take full width of their container */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row input[type="text"],
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row input[type="email"],
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row input[type="tel"],
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row select,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Wide fields span both columns */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .stripe-gateway-checkout-email-field {
    grid-column: 1 / -1 !important;
}

/* Half-width fields (first/last) should stay in their grid cells */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last {
    width: 100% !important;
}

/* ===================================
   FORM LABELS - ALWAYS ABOVE FIELDS
   =================================== */

.woocommerce-checkout .form-row label,
.woocommerce-checkout .woocommerce-billing-fields label,
.woocommerce-checkout .woocommerce-shipping-fields label,
.woocommerce-checkout .woocommerce-additional-fields label {
    display: block !important;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--opanije-dark);
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
    width: 100% !important;
    text-align: left !important;
    position: relative;
    float: none !important;
}

.woocommerce-checkout .form-row label abbr,
.woocommerce-checkout .woocommerce-billing-fields label abbr,
.woocommerce-checkout .woocommerce-billing-fields label .required,
.woocommerce-checkout .woocommerce-shipping-fields label abbr,
.woocommerce-checkout .woocommerce-shipping-fields label .required {
    color: var(--opanije-gold-dark);
    text-decoration: none;
    font-weight: 700;
}

/* Ensure labels have proper class for above positioning */
.woocommerce-checkout .form-label-above {
    display: block !important;
    margin-bottom: 8px !important;
}

/* Apply same styling to shipping fields */
.woocommerce-checkout .woocommerce-shipping-fields {
    background: var(--opanije-light-bg);
    padding: 35px;
    border-radius: var(--opanije-border-radius);
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    clear: none !important;
}

/* Ensure wrapper doesn't constrain the fields */
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row .woocommerce-input-wrapper {
    width: 100% !important;
    display: block !important;
}

/* Ensure all input fields take full width of their container */
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row input[type="text"],
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row input[type="email"],
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row input[type="tel"],
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row select,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-wide {
    grid-column: 1 / -1 !important;
}

.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-first,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-last {
    width: 100% !important;
}

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--opanije-dark);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .woocommerce-checkout .woocommerce-billing-fields h3,
    .woocommerce-checkout .woocommerce-shipping-fields h3,
    .woocommerce-checkout .woocommerce-additional-fields h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .woocommerce-checkout .woocommerce-billing-fields h3,
    .woocommerce-checkout .woocommerce-shipping-fields h3,
    .woocommerce-checkout .woocommerce-additional-fields h3 {
        font-size: 1.1rem;
    }
}

/* ===================================
   FORM FIELDS - MOBILE OPTIMIZED
   =================================== */

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    border: 2px solid #e0e0e0;
    border-radius: var(--opanije-border-radius-small);
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    margin-bottom: 0;
}

/* Mobile optimization - minimum 48x48px touch target with 8px spacing */
@media (max-width: 768px) {
    .woocommerce-checkout .form-row {
        margin-bottom: 8px; /* 8px spacing between fields */
    }

    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout select,
    .woocommerce-checkout textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Minimum touch target */
    }

    .woocommerce-checkout select {
        min-height: 48px; /* Ensure select dropdowns meet touch target size */
    }
}

@media (max-width: 480px) {
    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout select,
    .woocommerce-checkout textarea {
        padding: 16px 18px;
        font-size: 16px;
        min-height: 48px;
    }
}

/* Focus states - enhanced for accessibility */
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-color: var(--opanije-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(216, 168, 27, 0.2);
}

/* Mobile-optimized class for enhanced fields */
.woocommerce-checkout .mobile-optimized {
    -webkit-appearance: none;
    appearance: none;
}

/* Visual feedback for autofilled fields */
.woocommerce-checkout input.has-value,
.woocommerce-checkout select.has-value {
    border-color: #4caf50;
}

/* ZIP code field - visual indicator when autofill is working */
.woocommerce-checkout #billing_postcode:focus,
.woocommerce-checkout #shipping_postcode:focus {
    border-color: var(--opanije-gold);
}

/* Autofill styling override for webkit browsers */
.woocommerce-checkout input:-webkit-autofill,
.woocommerce-checkout input:-webkit-autofill:hover,
.woocommerce-checkout input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
    box-shadow: 0 0 0px 1000px #ffffff inset;
    -webkit-text-fill-color: var(--opanije-dark);
}

.woocommerce-checkout #place_order {
    background-color: var(--opanije-gold);
    color: var(--opanije-dark);
    border: none;
    padding: 18px 50px;
    border-radius: var(--opanije-border-radius-pill);
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.woocommerce-checkout #place_order:hover {
    background-color: var(--opanije-gold-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(216, 168, 27, 0.4);
}

/* WooCommerce Messages */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-error {
    border-radius: var(--opanije-border-radius-small);
    padding: 15px 20px;
    margin-bottom: 25px;
}

.woocommerce-cart .woocommerce-message,
.woocommerce-checkout .woocommerce-message {
    border-left: 4px solid #4caf50;
}

.woocommerce-cart .woocommerce-info,
.woocommerce-checkout .woocommerce-info {
    border-left: 4px solid var(--opanije-gold);
}

.woocommerce-cart .woocommerce-error,
.woocommerce-checkout .woocommerce-error {
    border-left: 4px solid #e74c3c;
}

/* ===================================
   STRIPE EXPRESS CHECKOUT BUTTONS
   Best practices for iframe containers
   =================================== */

/* Stripe Payment Request Button Wrapper - Main Container */
#wc-stripe-payment-request-wrapper,
.wc-stripe-payment-request-wrapper {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    clear: both !important;
    display: block !important;
}

/* Stripe Payment Request Button - iframe Container */
#wc-stripe-payment-request-button,
.wc-stripe-payment-request-button {
    width: 100% !important;
    min-height: 48px !important; /* WooCommerce 9.4+ standard */
    height: auto !important;
    padding: 0 !important;
    margin: 0 0 15px 0 !important;
    overflow: visible !important;
    display: block !important;
}

/* Ensure iframe has proper space */
#wc-stripe-payment-request-button iframe,
.wc-stripe-payment-request-button iframe {
    width: 100% !important;
    min-height: 48px !important;
    height: auto !important;
    border: none !important;
    display: block !important;
}

/* Separator between express checkout and regular checkout */
#wc-stripe-payment-request-button-separator,
.wc-stripe-payment-request-button-separator {
    margin: 20px 0 !important;
    padding: 0 !important;
    text-align: center !important;
    color: #666 !important;
    font-size: 0.9rem !important;
    font-family: 'Lato', sans-serif !important;
}

/* Mobile optimization for express checkout */
@media (max-width: 768px) {
    #wc-stripe-payment-request-wrapper,
    .wc-stripe-payment-request-wrapper {
        margin-bottom: 25px !important;
    }

    #wc-stripe-payment-request-button,
    .wc-stripe-payment-request-button {
        min-height: 52px !important; /* Slightly taller for mobile touch targets */
    }

    #wc-stripe-payment-request-button iframe,
    .wc-stripe-payment-request-button iframe {
        min-height: 52px !important;
    }
}

/* ===================================
   STRIPE PAYMENT FORM - FIX CLIPPING
   =================================== */

/* Remove any overflow hidden that clips Stripe forms */
.woocommerce-checkout #payment,
.woocommerce-checkout .woocommerce-checkout-payment,
.woocommerce-checkout #payment .payment_methods,
.woocommerce-checkout #payment .payment_box {
    overflow: visible !important;
}

/* Payment methods list container */
.woocommerce-checkout .wc_payment_methods {
    overflow: visible !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* Individual payment method */
.woocommerce-checkout .wc_payment_method {
    overflow: visible !important;
    margin-bottom: 0 !important;
    display: block !important;
}

/* Payment method label and icons container */
.woocommerce-checkout .wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border-radius: var(--opanije-border-radius-small) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
}

.woocommerce-checkout .wc_payment_method label:hover {
    background: #e9ecef !important;
}

/* Payment method radio button */
.woocommerce-checkout .wc_payment_method input[type="radio"] {
    flex-shrink: 0 !important;
    margin: 0 !important;
    width: 20px !important;
    height: 20px !important;
}

/* Payment method title/text */
.woocommerce-checkout .wc_payment_method label > span {
    flex: 1 1 auto !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: var(--opanije-dark) !important;
}

/* Payment method icons - CRITICAL FIX for overlapping */
.woocommerce-checkout .wc_payment_method img,
.woocommerce-checkout .payment_method_stripe img,
.woocommerce-checkout #payment .payment_methods li img {
    max-width: 45px !important;
    height: auto !important;
    margin: 0 3px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

/* Icons container within label */
.woocommerce-checkout .wc_payment_method label img {
    margin-left: auto !important;
}

/* Stripe payment icons wrapper */
.woocommerce-checkout .stripe-source-icons,
.woocommerce-checkout .payment_method_stripe .stripe-icons {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    align-items: center !important;
    margin-left: auto !important;
    max-width: 300px !important;
}

/* Stripe Payment Box - Proper Spacing */
.woocommerce-checkout #payment .payment_box,
.woocommerce-checkout .wc_payment_method .payment_box {
    background: #f8f9fa !important;
    padding: 25px !important;
    margin: 15px 0 25px 0 !important;
    border-radius: var(--opanije-border-radius-small) !important;
    min-height: 280px !important;
    overflow: visible !important;
}

/* Stripe Card Elements Container */
.woocommerce-checkout #stripe-card-element,
.woocommerce-checkout .wc-stripe-elements-field,
.woocommerce-checkout #stripe-card-group,
.woocommerce-checkout .stripe-card-group {
    width: 100% !important;
    min-height: 240px !important;
    padding: 20px 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clear: both !important;
}

/* Individual Stripe field containers */
.woocommerce-checkout #stripe-exp-element,
.woocommerce-checkout #stripe-cvc-element {
    min-height: 60px !important;
    margin-bottom: 20px !important;
    overflow: visible !important;
}

/* Stripe iframe - Ensure Full Visibility */
.woocommerce-checkout #stripe-card-element iframe,
.woocommerce-checkout .wc-stripe-elements-field iframe,
.woocommerce-checkout #stripe-exp-element iframe,
.woocommerce-checkout #stripe-cvc-element iframe {
    min-height: 50px !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    display: block !important;
}

/* Stripe Field Rows - Proper Spacing */
.woocommerce-checkout .stripe-source-errors {
    margin: 15px 0 !important;
    padding: 10px !important;
    color: #e74c3c !important;
    overflow: visible !important;
}

/* Mobile Payment Icons - Prevent Overlapping */
@media (max-width: 768px) {
    .woocommerce-checkout .wc_payment_method label {
        padding: 12px !important;
        gap: 8px !important;
    }

    .woocommerce-checkout .wc_payment_method img,
    .woocommerce-checkout .payment_method_stripe img,
    .woocommerce-checkout #payment .payment_methods li img {
        max-width: 38px !important;
        margin: 0 2px !important;
    }

    .woocommerce-checkout .stripe-source-icons,
    .woocommerce-checkout .payment_method_stripe .stripe-icons {
        max-width: 250px !important;
        gap: 3px !important;
    }

    .woocommerce-checkout #payment .payment_box,
    .woocommerce-checkout .wc_payment_method .payment_box {
        padding: 20px !important;
        min-height: 320px !important;
        margin-bottom: 30px !important;
    }

    .woocommerce-checkout #stripe-card-element,
    .woocommerce-checkout .wc-stripe-elements-field,
    .woocommerce-checkout #stripe-card-group {
        min-height: 280px !important;
        padding: 25px 0 !important;
    }

    .woocommerce-checkout #stripe-exp-element,
    .woocommerce-checkout #stripe-cvc-element {
        min-height: 70px !important;
        margin-bottom: 25px !important;
    }
}

/* Small Mobile - Extra Icon Constraints */
@media (max-width: 480px) {
    .woocommerce-checkout .wc_payment_method label {
        padding: 10px !important;
        gap: 6px !important;
        font-size: 0.9rem !important;
    }

    .woocommerce-checkout .wc_payment_method img,
    .woocommerce-checkout .payment_method_stripe img,
    .woocommerce-checkout #payment .payment_methods li img {
        max-width: 32px !important;
        margin: 0 1px !important;
    }

    .woocommerce-checkout .stripe-source-icons,
    .woocommerce-checkout .payment_method_stripe .stripe-icons {
        max-width: 200px !important;
        gap: 2px !important;
    }

    .woocommerce-checkout #payment .payment_box,
    .woocommerce-checkout .wc_payment_method .payment_box {
        min-height: 350px !important;
        padding: 20px 15px 30px !important;
    }

    .woocommerce-checkout #stripe-card-element,
    .woocommerce-checkout .wc-stripe-elements-field,
    .woocommerce-checkout #stripe-card-group {
        min-height: 300px !important;
        padding: 30px 0 !important;
    }

    .woocommerce-checkout #stripe-exp-element,
    .woocommerce-checkout #stripe-cvc-element {
        min-height: 75px !important;
    }
}

/* ===================================
   USABILITY & ACCESSIBILITY
   Following UX best practices from checklist
   =================================== */

/* Minimum tap target size 44x44px for all interactive elements */
.woocommerce-cart button,
.woocommerce-checkout button,
.woocommerce-cart .button,
.woocommerce-checkout .button,
.woocommerce-cart a.button,
.woocommerce-checkout a.button,
.woocommerce-cart input[type="submit"],
.woocommerce-checkout input[type="submit"] {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    border-radius: var(--opanije-border-radius-small) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

/* Quantity input buttons */
.woocommerce-cart .quantity .qty,
.woocommerce-cart .quantity button {
    min-height: 44px !important;
    min-width: 44px !important;
}

/* Remove/Delete item links */
.woocommerce-cart .product-remove a {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

/* Coupon code input */
.woocommerce-cart .coupon input,
.woocommerce-checkout .coupon input {
    min-height: 44px !important;
    padding: 10px 15px !important;
}

/* Place order button - thumb-friendly positioning with minimum touch target */
.woocommerce-checkout #place_order {
    width: 100% !important;
    max-width: 400px !important;
    margin: 20px auto !important;
    display: block !important;
    background: var(--opanije-gold) !important;
    color: var(--opanije-dark) !important;
    font-size: 1.1rem !important;
    padding: 16px 32px !important;
    min-height: 52px !important;
    border: none !important;
}

.woocommerce-checkout #place_order:hover {
    background: var(--opanije-gold-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(216, 168, 27, 0.4) !important;
}

/* Mobile - ensure minimum 48px touch target with spacing */
@media (max-width: 768px) {
    .woocommerce-checkout #place_order {
        min-height: 48px !important;
        margin: 16px auto 8px !important; /* 8px spacing below */
    }
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .woocommerce {
        padding: 0 15px;
    }

    /* Mobile Hero Adjustments */
    body.woocommerce-cart .entry-header,
    body.woocommerce-checkout .entry-header {
        padding: 35px 15px;
        margin-bottom: 30px;
    }

    body.woocommerce-cart .entry-title,
    body.woocommerce-checkout .entry-title {
        font-size: 1.8rem;
    }

    body.woocommerce-cart .entry-header .cart-subtitle,
    body.woocommerce-checkout .entry-header .checkout-subtitle {
        font-size: 0.9rem;
    }

    /* Cart Page Header Mobile */
    .cart-page-header {
        padding: 30px 0 40px;
        margin-bottom: 30px;
    }

    .cart-header-content {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }

    .cart-logo img {
        width: 70px;
        height: 70px;
    }

    .cart-header-text h1 {
        font-size: 1.8rem;
    }

    .cart-subtitle {
        font-size: 1rem;
    }

    /* Cart Breadcrumbs Mobile */
    .cart-breadcrumbs {
        max-width: 100%;
        gap: 10px;
    }

    .breadcrumb-item {
        gap: 5px;
    }

    .breadcrumb-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .breadcrumb-text {
        font-size: 0.7rem;
    }

    .breadcrumb-divider {
        width: 25px;
        margin-top: -20px;
    }

    /* Mobile Progress Steps */
    .cart-progress-steps {
        gap: 10px;
    }

    .progress-step {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    /* Mobile Trust Badges */
    .checkout-trust-badges {
        gap: 15px;
    }

    .trust-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Mobile Content Cards */
    body.woocommerce-cart .woocommerce > form,
    body.woocommerce-cart .cart-collaterals {
        padding: 25px 20px;
        border-radius: var(--opanije-border-radius-small);
    }

    .woocommerce table.shop_table thead {
        display: none;
    }

    .woocommerce table.shop_table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: var(--opanije-border-radius-small);
        padding: 15px;
    }

    .woocommerce table.shop_table td {
        display: block;
        text-align: left;
        border: none;
        padding: 10px 0;
    }

    .woocommerce table.shop_table td:before {
        content: attr(data-title);
        font-weight: 700;
        display: inline-block;
        margin-right: 10px;
        color: var(--opanije-dark);
    }

    .woocommerce table.shop_table .product-thumbnail img {
        max-width: 80px;
    }

    .cart-collaterals {
        padding: 20px;
    }

    .cart-collaterals .shop_table th,
    .cart-collaterals .shop_table td {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .woocommerce .wc-proceed-to-checkout a.checkout-button {
        font-size: 1.1rem;
        padding: 16px 35px;
    }

    .woocommerce-checkout #place_order {
        font-size: 1.1rem;
        padding: 16px 40px;
    }

    .woocommerce .coupon {
        flex-direction: column;
        gap: 15px;
    }

    .woocommerce-cart .coupon input[type="text"] {
        width: 100%;
    }

    .woocommerce-cart .coupon button {
        width: 100%;
    }

    /* Billing Fields Mobile Optimization */
    .woocommerce-checkout .woocommerce-billing-fields {
        padding: 25px 20px;
    }

    .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }

    .woocommerce-checkout .woocommerce-billing-fields label {
        font-size: 0.9rem;
    }

    /* Shipping Fields Mobile Optimization */
    .woocommerce-checkout .woocommerce-shipping-fields {
        padding: 25px 20px;
    }

    .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }
}

@media (max-width: 480px) {
    .woocommerce {
        padding: 0 10px;
    }

    /* Small Mobile Hero Adjustments */
    body.woocommerce-cart .entry-header,
    body.woocommerce-checkout .entry-header {
        padding: 30px 10px;
        margin-bottom: 25px;
    }

    body.woocommerce-cart .entry-title,
    body.woocommerce-checkout .entry-title {
        font-size: 1.6rem;
    }

    body.woocommerce-cart .entry-header .cart-subtitle,
    body.woocommerce-checkout .entry-header .checkout-subtitle {
        font-size: 0.85rem;
    }

    /* Small Mobile Content Cards */
    body.woocommerce-cart .woocommerce > form,
    body.woocommerce-cart .cart-collaterals {
        padding: 20px 15px;
    }

    /* Extra small mobile progress steps */
    .progress-step {
        padding: 7px 14px;
        font-size: 0.75rem;
    }

    .progress-step-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

    .woocommerce table.shop_table {
        font-size: 0.9rem;
    }

    .woocommerce table.shop_table td {
        padding: 8px 0;
    }

    .woocommerce table.shop_table .product-thumbnail img {
        max-width: 60px;
    }

    .cart-collaterals {
        padding: 15px;
    }

    .cart-collaterals .shop_table th,
    .cart-collaterals .shop_table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .woocommerce .wc-proceed-to-checkout a.checkout-button {
        font-size: 1rem;
        padding: 14px 30px;
        letter-spacing: 0.5px;
    }

    .woocommerce-checkout #place_order {
        font-size: 1rem;
        padding: 14px 30px;
        letter-spacing: 0.5px;
    }

    .woocommerce-cart button[name="update_cart"] {
        font-size: 0.9rem;
        padding: 12px 28px;
    }

    .woocommerce-cart .quantity input {
        width: 70px;
        padding: 8px 12px;
        font-size: 0.95rem;
    }

    /* Billing Fields Small Mobile Optimization */
    .woocommerce-checkout .woocommerce-billing-fields {
        padding: 20px 15px;
    }

    .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        gap: 15px;
    }

    .woocommerce-checkout .woocommerce-billing-fields label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    /* Shipping Fields Small Mobile Optimization */
    .woocommerce-checkout .woocommerce-shipping-fields {
        padding: 20px 15px;
    }

    .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
        gap: 15px;
    }
}
