/*
Theme Name: Mudakoll
Theme URI: https://mudakoll.ee
Author: Pilvepank OÜ
Author URI: https://pilvepank.ee
Description: A premium off-road parts theme with vehicle picker and WooCommerce integration.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mudakoll
*/

/* Basic Reset & Defaults */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}


/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #1A1A1A;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #E8593C;
}

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: #111111;
}
::-webkit-scrollbar-thumb {
    background: #353534;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E8593C;
}

/* Industrial Utility Classes */
.milled-effect {
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.02) 1px, transparent 0);
    background-size: 24px 24px;
}

/* WooCommerce Overrides */
.woocommerce-result-count {
    margin: 0 !important;
}
.woocommerce-ordering {
    margin: 0 !important;
}
.woocommerce-ordering select {
    background-color: #1C1B1B !important;
    color: white !important;
    border: 1px solid #353534 !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1.5rem 0.5rem 0.5rem !important;
    cursor: pointer;
    border-radius: 2px;
    outline: none;
}
.woocommerce-ordering select option {
    background-color: #1C1B1B !important;
    color: white !important;
}

/* List View Layout Overrides */
.list-view-active #mudakoll-products-container {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}
.list-view-active #mudakoll-products-container .group {
    display: flex !important;
    flex-direction: column !important;
    min-height: auto;
}

@media (min-width: 640px) {
    .list-view-active #mudakoll-products-container .group {
        display: grid !important;
        grid-template-columns: 160px 1fr 180px !important;
        align-items: center;
        padding-right: 1.5rem !important;
        min-height: 160px;
    }
    .list-view-active #mudakoll-products-container .group > div:first-child {
        width: 160px !important;
        height: 160px !important;
        flex-shrink: 0;
    }
    .list-view-active #mudakoll-products-container .group > div:nth-child(2) {
        padding: 1.5rem !important;
        flex-grow: 1;
    }
    .list-view-active #mudakoll-products-container .group > a:last-child {
        grid-column: 3;
        width: auto !important;
        height: auto !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 11px !important;
        border-radius: 2px !important;
        margin: 0 !important;
    }
    .list-view-active #mudakoll-products-container .product-desc {
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
    }
}

@media (max-width: 640px) {
    .list-view-active #mudakoll-products-container .group > div:first-child {
        width: 100% !important;
        height: 220px !important;
    }
    .list-view-active #mudakoll-products-container .group .product-desc {
        display: none !important;
    }
}



/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
}
.pagination ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}
.pagination li span, .pagination li a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #353534;
    color: #C9C6BD;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.pagination li span.current {
    background-color: #E8593C;
    border-color: #E8593C;
    color: white;
}
.pagination li a:hover {
    border-color: white;
    color: white;
}

/* Price HTML */
.price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.price ins {
    text-decoration: none;
    font-weight: 900;
    color: #E8593C;
    font-size: 1.125rem;
}
.price del {
    color: #C9C6BD;
    font-size: 0.75rem;
}

/* Sidebar List */
.mudakoll-category-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mudakoll-category-list li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mudakoll-category-list a {
    display: flex !important;
    align-items: center !important;
    padding: 0.4rem 0.6rem !important;
    text-decoration: none !important;
}

/* Nested Subcategories (Children) */
.mudakoll-category-list ul.children {
    list-style: none !important;
    padding: 0 !important;
    margin: 0.15rem 0 0.3rem 0.6rem !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: none !important; /* Hidden by default */
    flex-direction: column !important;
    gap: 0.15rem !important;
}

/* Only expand the children of active categories / branches */
.mudakoll-category-list li.active-branch > ul.children {
    display: flex !important;
}

.mudakoll-category-list ul.children ul.children {
    margin-left: 0.75rem !important;
}
/* Range Input */
input[type='range'] {
    accent-color: #E8593C;
}

/* Pagination Overrides */
.mudakoll-pagination a, .mudakoll-pagination span {
    text-decoration: none !important;
}

/* Hide WooCommerce dynamic "View Cart" link since side-cart slides open automatically */
a.added_to_cart {
    display: none !important;
}

/* Custom WooCommerce Cart & Checkout Elegance Overrides */
.woocommerce-cart-form, .woocommerce-checkout {
    font-family: 'Space Grotesk', sans-serif !important;
}

/* Glassmorphism panels & containers */
.glass-panel, 
.bg-surface-container-low,
.bg-surface-container-highest,
.bg-surface-container-lowest,
#payment li.wc_payment_method,
.woocommerce-checkout-review-order,
.cart_totals {
    background: rgba(20, 20, 20, 0.45) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Subtle highlights for section states */
.bg-surface-container-low:hover,
#payment li.wc_payment_method:hover {
    border-color: rgba(232, 89, 60, 0.2) !important;
    box-shadow: 0 12px 40px 0 rgba(232, 89, 60, 0.05) !important;
}

/* Sleeker Input styling */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-cart-form input[type="text"],
.woocommerce-cart-form input[type="number"],
.woocommerce-cart-form select,
.woocommerce-cart-form textarea,
.select2-container--default .select2-selection--single {
    background-color: rgba(10, 10, 10, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 3px !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.85rem !important;
    font-family: 'Space Grotesk', sans-serif !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-cart-form input:focus {
    border-color: #E8593C !important;
    box-shadow: 0 0 0 1px rgba(232, 89, 60, 0.25), inset 0 0 8px rgba(0,0,0,0.6) !important;
    background-color: rgba(15, 15, 15, 0.8) !important;
    outline: none !important;
}

/* Sleek checkout labels */
.woocommerce-checkout label, .woocommerce-checkout-review-order label {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #A6A49E !important;
    margin-bottom: 0.4rem !important;
}

/* Tables, headers and cells */
.shop_table th, .shop_table td,
.cart_totals th, .cart_totals td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.2rem 1rem !important;
}

.shop_table th, .cart_totals th {
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #A6A49E !important;
}

.shop_table td, .cart_totals td {
    color: #ffffff !important;
}

/* Quantity inputs */
.woocommerce-cart-form .quantity input {
    background: rgba(10, 10, 10, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 3px !important;
    padding: 0.4rem !important;
}

/* Premium gradient and button states */
.gradient-btn,
#place_order,
button[name="update_cart"] {
    background: linear-gradient(135deg, #f86b52 0%, #d64326 100%) !important;
    color: #ffffff !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    border-radius: 3px !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 20px rgba(232, 89, 60, 0.2) !important;
    cursor: pointer !important;
}

.gradient-btn:hover,
#place_order:hover,
button[name="update_cart"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(232, 89, 60, 0.35) !important;
    filter: brightness(1.1) !important;
}

.gradient-btn:active,
#place_order:active,
button[name="update_cart"]:active {
    transform: translateY(0) !important;
}

/* Unchecked terms & privacy policy styling */
.woocommerce-form__label-for-checkbox {
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #C9C6BD !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
}

.woocommerce-form__label-for-checkbox input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(10, 10, 10, 0.5) !important;
    border-radius: 2px !important;
    margin-right: 10px !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.woocommerce-form__label-for-checkbox input[type="checkbox"]:checked {
    border-color: #E8593C !important;
    background-color: #E8593C !important;
}

.woocommerce-form__label-for-checkbox input[type="checkbox"]:checked::before {
    content: "✓" !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: bold !important;
}

/* Radio button customized */
#payment ul.payment_methods input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(10, 10, 10, 0.5) !important;
    border-radius: 50% !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    margin-right: 10px !important;
}

#payment ul.payment_methods input[type="radio"]:checked {
    border-color: #E8593C !important;
}

#payment ul.payment_methods input[type="radio"]:checked::before {
    content: "" !important;
    display: block !important;
    width: 8px !important;
    height: 8px !important;
    background-color: #E8593C !important;
    border-radius: 50% !important;
}

/* Notices and errors styling */
.woocommerce-error, .woocommerce-info, .woocommerce-message {
    background-color: rgba(20, 20, 20, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-left: 3px solid #E8593C !important;
    color: #ffffff !important;
    padding: 1rem 1.5rem !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 1.5rem !important;
    list-style: none !important;
}

.woocommerce-error li, .woocommerce-info li, .woocommerce-message li {
    list-style: none !important;
}

/* Checkout progress bar alignment and design */
.woocommerce-cart main, .woocommerce-checkout main {
    background-color: #111111 !important;
}

/* Side-by-side checkout fields styling */
.woocommerce-checkout .form-row:not(.form-row-first):not(.form-row-last) {
    clear: both !important;
}
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: 48% !important;
    float: left !important;
    clear: none !important;
}
.woocommerce-checkout .form-row-first {
    clear: left !important;
}
.woocommerce-checkout .form-row-last {
    float: right !important;
    clear: none !important;
}
.woocommerce-checkout .form-row::after {
    content: "";
    display: table;
    clear: both;
}

/* Hide Quantity input spinner arrows and center text */
.woocommerce-cart-form input[type="number"]::-webkit-outer-spin-button,
.woocommerce-cart-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.woocommerce-cart-form input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: none !important;
    text-align: center !important;
}
.quantity-control input[type="number"] {
    text-align: center !important;
    width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
}


