/*
Theme Name: Meeral Technologies Corporate Store
Theme URI: https://meeral.net/store/
Author: Azitics Private Limited
Author URI: https://azitics.com
Description: Dedicated Enterprise B2B WooCommerce Theme engineered for Meeral Technologies (Private) Limited, mirroring the corporate web portal with 100% brand fidelity, Tailwind CSS, FontAwesome 6, and Inter typography.
Version: 1.1.0
Text Domain: meeral-corporate
*/

:root {
    --brand-dark: #070F26;
    --brand-navy: #0B1B3D;
    --brand-blue: #1E40AF;
    --brand-cyan: #06B6D4;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
}

/* Ensure padding so bottom mobile nav bar never obscures content */
@media (max-width: 768px) {
    body {
        padding-bottom: 5.5rem !important;
    }
}

/* -------------------------------------------------------------
   SHOP LOOP & PRODUCT GRID
   ------------------------------------------------------------- */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products:before,
.woocommerce ul.products:after {
    display: none !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 1.5rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.12), 0 8px 10px -6px rgba(30, 64, 175, 0.08) !important;
    transform: translateY(-4px) !important;
}

.woocommerce ul.products li.product a img {
    margin-bottom: 1rem !important;
    border-radius: 1.125rem !important;
    background: #f8fafc !important;
    padding: 1rem !important;
    height: 210px !important;
    width: 100% !important;
    object-fit: contain !important;
    transition: transform 0.35s ease !important;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.05) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
    padding: 0 !important;
    min-height: 2.8rem !important;
}

.woocommerce ul.products li.product .price {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #1e40af !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

.woocommerce ul.products li.product .price del {
    color: #94a3b8 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none !important;
    color: #1e40af !important;
}

/* -------------------------------------------------------------
   BUTTONS (CLEAN, ICON-SUPPORTED, NO RAW HTML)
   ------------------------------------------------------------- */
.woocommerce ul.products li.product .button,
.woocommerce div.product form.cart .button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce .cart .button,
.woocommerce .checkout-button {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.8125rem !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 0.75rem !important;
    text-transform: none !important;
    border: none !important;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-height: 44px !important;
    text-align: center !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce .cart .button:hover,
.woocommerce .checkout-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Add Cart Icon cleanly via CSS ::before without touching PHP string filters */
.woocommerce ul.products li.product .button::before,
.woocommerce div.product form.cart .button::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    content: "\f07a" !important;
    font-size: 0.8125rem !important;
    margin-right: 0.25rem !important;
}

/* Added-to-cart state */
.woocommerce ul.products li.product .button.added::after {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    content: "\f00c" !important;
    margin-left: 0.5rem !important;
    color: #4ade80 !important;
}

.woocommerce ul.products li.product .added_to_cart {
    display: block !important;
    text-align: center !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    margin-top: 0.5rem !important;
    text-decoration: underline !important;
}

/* -------------------------------------------------------------
   SINGLE PRODUCT PAGE
   ------------------------------------------------------------- */
.woocommerce div.product {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3rem !important;
}

.woocommerce div.product div.images {
    width: 100% !important;
    float: none !important;
    margin-bottom: 0 !important;
    border-radius: 1.5rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    padding: 1.75rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Force gallery to be 100% visible immediately (overriding JS opacity:0) */
.woocommerce-product-gallery {
    opacity: 1 !important;
    visibility: visible !important;
}

.woocommerce-product-gallery img {
    width: 100% !important;
    max-height: 420px !important;
    object-fit: contain !important;
    border-radius: 1rem !important;
}

.woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
    margin-bottom: 0 !important;
}

.woocommerce div.product .product_title {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: #0b1b3d !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.25 !important;
}

.woocommerce div.product p.price {
    font-size: 1.875rem !important;
    font-weight: 800 !important;
    color: #1e40af !important;
    margin-bottom: 1.25rem !important;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 0.9375rem !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 1.5rem !important;
}

.woocommerce div.product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce .quantity .qty {
    width: 4.5rem !important;
    height: 44px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    text-align: center !important;
    margin-right: 0 !important;
    background: #f8fafc !important;
}

/* -------------------------------------------------------------
   NOTICES & ALERTS
   ------------------------------------------------------------- */
.woocommerce-message, 
.woocommerce-info, 
.woocommerce-error {
    border-radius: 0.875rem !important;
    border-top: none !important;
    padding: 1rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
}

.woocommerce-message {
    background-color: #ecfdf5 !important;
    border-left: 5px solid #10b981 !important;
    color: #065f46 !important;
}

.woocommerce-info {
    background-color: #eff6ff !important;
    border-left: 5px solid #3b82f6 !important;
    color: #1e40af !important;
}

.woocommerce-error {
    background-color: #fef2f2 !important;
    border-left: 5px solid #ef4444 !important;
    color: #991b1b !important;
}

/* -------------------------------------------------------------
   CART & CHECKOUT RESPONSIVENESS
   ------------------------------------------------------------- */
.woocommerce table.shop_table {
    border-radius: 1rem !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

.woocommerce table.shop_table th {
    background: #0b1b3d !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    padding: 0.875rem 1rem !important;
}

.woocommerce table.shop_table td {
    padding: 1rem !important;
    border-top: 1px solid #f1f5f9 !important;
}

.woocommerce-checkout #order_review {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    padding: 1.5rem !important;
}

.woocommerce-checkout #payment {
    background: transparent !important;
    border: none !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    padding: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 1rem !important;
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
    transition: all 0.2s ease !important;
}

.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

.woocommerce-checkout #payment #place_order {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    min-height: 46px !important;
    background: #ffffff !important;
}

/* -------------------------------------------------------------
   SORTING & RESULT COUNT
   ------------------------------------------------------------- */
.woocommerce .woocommerce-result-count {
    margin-bottom: 0.75rem !important;
    font-size: 0.8125rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.woocommerce .woocommerce-ordering {
    margin-bottom: 1.5rem !important;
}

.woocommerce .woocommerce-ordering select {
    padding: 0.625rem 2.25rem 0.625rem 1rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.75rem !important;
    background-color: #ffffff !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    outline: none !important;
}

/* -------------------------------------------------------------
   MOBILE BREAKPOINTS (< 640px)
   ------------------------------------------------------------- */
@media (max-width: 639px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    .woocommerce ul.products li.product {
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
    }

    .woocommerce ul.products li.product a img {
        height: 180px !important;
        padding: 0.75rem !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        min-height: auto !important;
        font-size: 0.9375rem !important;
    }

    .woocommerce-ordering,
    .woocommerce-result-count {
        float: none !important;
        width: 100% !important;
        text-align: left !important;
    }

    .woocommerce .woocommerce-ordering select {
        width: 100% !important;
    }

    .woocommerce div.product {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .woocommerce div.product div.images {
        padding: 1rem !important;
        border-radius: 1.25rem !important;
    }

    .woocommerce div.product form.cart {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .woocommerce div.product form.cart .quantity {
        width: 100% !important;
    }

    .woocommerce div.product form.cart .quantity .qty {
        width: 100% !important;
        height: 48px !important;
    }

    .woocommerce div.product form.cart .button {
        width: 100% !important;
        height: 48px !important;
    }

    /* Mobile Responsive Cart Table */
    .woocommerce table.shop_table_responsive thead {
        display: none !important;
    }

    .woocommerce table.shop_table_responsive tr {
        display: block !important;
        margin-bottom: 1rem !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 1rem !important;
        background: #ffffff !important;
        padding: 0.75rem !important;
    }

    .woocommerce table.shop_table_responsive tr td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        padding: 0.5rem 0 !important;
        text-align: right !important;
    }

    .woocommerce table.shop_table_responsive tr td:last-child {
        border-bottom: none !important;
    }

    .woocommerce table.shop_table_responsive tr td::before {
        content: attr(data-title) ": " !important;
        font-weight: 700 !important;
        color: #64748b !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        text-align: left !important;
    }

    .woocommerce table.shop_table_responsive tr td.product-remove::before,
    .woocommerce table.shop_table_responsive tr td.product-thumbnail::before {
        display: none !important;
    }

    .woocommerce table.shop_table_responsive tr td.product-thumbnail {
        justify-content: center !important;
    }

    .woocommerce table.shop_table_responsive tr td.product-thumbnail img {
        width: 80px !important;
        height: auto !important;
    }

    .woocommerce table.shop_table_responsive tr td.actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .woocommerce table.shop_table_responsive tr td.actions .coupon {
        display: flex !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }

    .woocommerce table.shop_table_responsive tr td.actions .coupon input {
        flex: 1 !important;
        width: auto !important;
        min-height: 44px !important;
    }

    .woocommerce table.shop_table_responsive tr td.actions button {
        width: 100% !important;
        min-height: 44px !important;
    }

    .woocommerce .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
    }
}
