/**
 * WooCommerce Styles for AvPro Theme
 * Based on draft.avpro.at design
 *
 * @package AvPro
 * @since 1.0.0
 */

/* Shop Page */
.woocommerce-page .woocommerce {
    margin-bottom: var(--avpro-spacing-xl);
    background: var(--avpro-white);
    border-radius: var(--avpro-radius-xl);
    padding: 0 !important;
}

/* Product Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--avpro-spacing-lg);
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce ul.products.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 991px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .woocommerce ul.products,
    .woocommerce ul.products.columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--avpro-spacing-md);
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products,
    .woocommerce ul.products.columns-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Product Item */
.woocommerce ul.products li.product {
    background: var(--avpro-white);
    border: none;
    border-radius: var(--avpro-radius-md);
    padding: var(--avpro-spacing-md);
    transition: var(--avpro-transition-base);
    text-align: center;
    box-shadow: var(--avpro-shadow-sm);
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--avpro-shadow-md);
    transform: translateY(-5px);
}

.woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    border-radius: var(--avpro-radius-md);
    margin-bottom: var(--avpro-spacing-md);
    object-fit: contain;
    max-height: 150px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: var(--avpro-font-md);
    font-weight: var(--avpro-font-bold);
    color: var(--avpro-text);
    margin-bottom: var(--avpro-spacing-sm);
}

.woocommerce ul.products li.product .price {
    color: var(--avpro-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--avpro-spacing-md);
}

.woocommerce ul.products li.product .price del {
    color: var(--avpro-text-muted);
    font-size: 0.875rem;
}

.woocommerce ul.products li.product .button {
    background-color: var(--avpro-primary);
    color: var(--avpro-white);
    border: none;
    padding: 17px 40px;
    border-radius: var(--avpro-radius-full);
    font-size: var(--avpro-font-lg);
    line-height: var(--avpro-line-height-base);
    text-decoration: none;
    display: inline-block;
    transition: var(--avpro-transition-base);
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--avpro-primary-dark);
    color: var(--avpro-white);
}

/* ==========================================================================
   SINGLE PRODUCT
   ========================================================================== */

.woocommerce div.product {
    margin-bottom: var(--avpro-spacing-xl);
}

.single-product #secondary.widget-area,
.single-product aside.widget-area,
.tax-product_cat #secondary.widget-area,
.tax-product_tag #secondary.widget-area {
    display: none !important;
}

.tax-product_cat .avpro-category-sidebar,
.tax-product_tag .avpro-category-sidebar {
    display: block !important;
    width: 100% !important;
}

.single-product .woocommerce h1.product_title,
.single-product .woocommerce .product_title.entry-title {
    display: block !important;
    margin-bottom: 30px;
    margin-top: 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
    display: none !important;
}

.woocommerce div.product div.images img {
    cursor: pointer !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image a {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image a.glightbox-product {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.woocommerce div.product div.images .glightbox-product::after {
    content: "\F52A";
}

/* ==========================================================================
   TWO-COLUMN LAYOUT - Single Product
   ========================================================================== */

/* Mobile: stack vertically */
.single-product .woocommerce div.product {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 30px;
    width: 100%;
    max-width: 100%;
}

/* Gallery: left column */
.single-product .woocommerce div.product .woocommerce-product-gallery {
    width: calc(50% - 15px) !important;
    flex: 0 0 calc(50% - 15px) !important;
    align-self: flex-start !important;
    margin-bottom: 0 !important;
}

/* Summary: right column - sticky */
.single-product .woocommerce div.product .summary.entry-summary {
    width: calc(50% - 15px) !important;
    flex: 0 0 calc(50% - 15px) !important;
    align-self: flex-start !important;
    position: sticky !important;
    top: 100px !important;
}

/* Tabs: full width wrapper, content aligned to right column */
.single-product .woocommerce div.product .woocommerce-tabs,
.single-product .woocommerce div.product .woocommerce-tabs.wc-tabs-wrapper {
    width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    order: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    padding-left: calc(50% + 15px) !important;
    box-sizing: border-box !important;
}

/* Upsells + Related: full width */
.single-product .woocommerce div.product .upsells.products,
.single-product .woocommerce div.product .related.products {
    width: 100% !important;
    flex: 0 0 100% !important;
}

/* Mobile: all full width */
@media (max-width: 767px) {
    .single-product .woocommerce div.product .woocommerce-product-gallery,
    .single-product .woocommerce div.product .summary.entry-summary,
    .single-product .woocommerce div.product .woocommerce-tabs {
        width: 100% !important;
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        position: static !important;
    }

    .single-product .woocommerce div.product .summary.entry-summary {
        position: static !important;
    }
}

/* ==========================================================================
   GALLERY IMAGES
   ========================================================================== */

.woocommerce div.product .woocommerce-product-gallery {
    align-self: start;
}

.woocommerce div.product .woocommerce-product-gallery__image {
    border-radius: var(--avpro-radius);
    overflow: hidden;
}

.woocommerce-product-gallery { width: 100%; }
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper { width: 100%; }
.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
}
.woocommerce-product-gallery .flex-viewport { width: 100%; max-width: 100%; }

.single-product .woocommerce div.product .woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
    max-height: 500px !important;
    object-fit: contain !important;
}

/* ==========================================================================
   GALLERY THUMBNAILS
   ========================================================================== */

.flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none !important;
    padding: 0 !important;
    margin: 20px 0 0 0 !important;
    width: 100%;
}

.flex-control-nav.flex-control-thumbs li {
    flex: 0 0 auto;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    display: block !important;
    background: var(--avpro-white);
    border: none;
    border-radius: var(--avpro-radius-md);
    padding: var(--avpro-spacing-md);
    transition: var(--avpro-transition-base);
    text-align: center;
    box-shadow: var(--avpro-shadow-sm);
}

.flex-control-nav.flex-control-thumbs li img {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.flex-control-nav.flex-control-thumbs li img:hover { opacity: 1; }
.flex-control-nav.flex-control-thumbs li.flex-active img { opacity: 1; border-color: #003da5; }

@media (max-width: 768px) {
    .woocommerce-product-gallery { margin-bottom: 20px; }
    .flex-control-nav.flex-control-thumbs { gap: 5px; margin: 10px 0 0 0; }
    .flex-control-nav.flex-control-thumbs li img { width: 60px; height: 60px; }
}

/* ==========================================================================
   PRODUCT PRICE & META
   ========================================================================== */

.woocommerce div.product .price {
    color: var(--avpro-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--avpro-spacing-lg);
}

.product_meta { display: grid; margin-top: var(--avpro-spacing-md); }

/* ==========================================================================
   PRODUCT TABS
   ========================================================================== */

.woocommerce div.product .woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--avpro-spacing-lg) 0;
    border-bottom: 2px solid var(--avpro-border);
    display: flex;
    gap: var(--avpro-spacing-md);
}

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

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: var(--avpro-spacing-sm) var(--avpro-spacing-lg);
    color: var(--avpro-text);
    text-decoration: none;
    border-radius: var(--avpro-radius-sm) var(--avpro-radius-sm) 0 0;
    transition: all 0.3s ease;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    background: var(--avpro-primary);
    color: var(--avpro-white);
}

.woocommerce div.product .woocommerce-tabs ul li p {
    margin-bottom: 0 !important;
}

.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel--description,
.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel--description .entry-content,
.woocommerce div.product .woocommerce-tabs .panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel ul,
.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel ol {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1.5em !important;
    box-sizing: border-box !important;
}

.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel li {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.woocommerce div.product .woocommerce-tabs .wc-tab,
.woocommerce div.product .woocommerce-tabs .wc-tab.col-12,
.woocommerce div.product .woocommerce-tabs .wc-tab.col-lg-8,
.woocommerce-Tabs-panel.wc-tab.col-lg-8,
body.single-product .wc-tab.col-lg-8 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.woocommerce div.product .woocommerce-tabs.wc-tabs-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    float: none !important;
}

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

.cart-items-wrapper {
    background: var(--avpro-white);
    border: 1px solid var(--avpro-border);
    border-radius: var(--avpro-radius);
    overflow: hidden;
}

.cart-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--avpro-primary);
    font-weight: 600;
}

@media (min-width: 992px) {
    .cart-header,
    .cart-item {
        display: grid;
        grid-template-columns: 150px 1fr 120px 150px 120px 60px;
        gap: 20px;
        align-items: center;
    }
}

.cart-item {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--avpro-border);
    transition: background-color 0.3s ease;
}

.cart-item:last-child { border-bottom: none; }
.cart-col { display: flex; align-items: center; }
.cart-col-thumbnail { flex: 0 0 150px; }

.cart-col-thumbnail .cart-product-image {
    display: block;
    max-width: 150px;
    max-height: 150px;
    overflow: hidden;
    border-radius: var(--avpro-radius-md);
}

.cart-col-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: var(--avpro-radius-md);
}

.cart-col-name { flex: 1; min-width: 200px; }
.cart-col-name .product-title { font-size: 1.125rem; margin-bottom: 0 !important; }
.cart-col-name .product-title a { color: var(--avpro-text); text-decoration: none; transition: color 0.3s ease; }
.cart-col-name .product-title a:hover { color: var(--avpro-primary); }
.cart-col-price { flex: 0 0 120px; font-size: 1.125rem; font-weight: 600; color: #fff; }
.cart-col-quantity { flex: 0 0 150px; color: #fff; }
.cart-col-subtotal { flex: 0 0 160px; font-size: 1.125rem; font-weight: 600; color: #fff; white-space: nowrap; }
.cart-col-remove { text-align: center; }

.cart-col-remove .remove,
.rental-cart-col-remove .yith-ywraq-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #dc3545;
    font-size: 24px;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cart-col-remove .remove:hover,
.rental-cart-col-remove .yith-ywraq-item-remove:hover {
    background-color: #dc3545;
    color: white;
}

@media (max-width: 991px) {
    .cart-header { display: none; }
    .cart-item {
        display: grid;
        grid-template-columns: 120px 1fr;
        grid-template-areas:
            "thumbnail name"
            "thumbnail price"
            "thumbnail quantity"
            "thumbnail subtotal"
            "thumbnail remove";
        gap: 10px 15px;
        padding: 15px;
    }
    .cart-col-thumbnail { grid-area: thumbnail; flex: none; }
    .cart-col-thumbnail .cart-product-image,
    .cart-col-thumbnail img { max-width: 120px; max-height: 120px; }
    .cart-col-name { grid-area: name; min-width: 0; }
    .cart-col-price { grid-area: price; }
    .cart-col-quantity { grid-area: quantity; }
    .cart-col-subtotal { grid-area: subtotal; }
    .cart-col-remove { grid-area: remove; }
    .cart-col[data-label]:not([data-label=""]):before {
        content: attr(data-label) ": ";
        font-weight: 600;
        margin-right: 5px;
        color: var(--avpro-text);
    }
    .cart-col-name,
    .cart-col-price,
    .cart-col-quantity,
    .cart-col-subtotal,
    .cart-col-remove { flex: none; width: 100%; }
}

@media (max-width: 576px) {
    .cart-item {
        grid-template-columns: 1fr;
        grid-template-areas: "thumbnail" "name" "price" "quantity" "subtotal" "remove";
        text-align: center;
    }
    .cart-col-thumbnail { justify-content: center; }
    .cart-col-thumbnail .cart-product-image { max-width: 100%; max-height: 200px; }
    .cart-col-thumbnail img { max-width: 100%; max-height: 200px; }
}

.cart-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px;
    background: var(--avpro-secondary);
    border-radius: var(--avpro-radius);
}

@media (max-width: 576px) {
    .cart-actions { flex-direction: column; }
    .cart-actions button { width: 100%; }
}

.cart_totals {
    background: #f2f2f7;
    padding: var(--avpro-spacing-lg);
    border-radius: var(--avpro-radius);
    margin-top: var(--avpro-spacing-lg);
}

.cart_totals h2 { margin-bottom: var(--avpro-spacing-md); font-size: 1.5rem; font-weight: 700; color: var(--avpro-text); }

.cart-totals-wrapper {
    background: var(--avpro-white);
    border: 1px solid var(--avpro-border);
    border-radius: var(--avpro-radius);
    overflow: hidden;
}

.cart-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--avpro-border);
}

.cart-totals-row:last-child { border-bottom: none; }
.cart-totals-row.order-total { font-size: 1.25rem; font-weight: 600; }
.cart-totals-label { flex: 0 0 auto; font-weight: 600; color: var(--avpro-text); }
.cart-totals-value { flex: 1; text-align: right; font-weight: 600; }
.includes_tax { font-weight: 400; }
.cart-totals-row.tax-notice .cart-totals-value,
.cart-totals-row.shipping .cart-totals-value { text-align: left; }
.cart-totals-row.tax-notice .cart-totals-value ul { margin-bottom: 0; }
.cart-totals-row.shipping { border-bottom: none; }
.woocommerce-shipping-methods { list-style: none; padding: 0; margin: 0; }
.woocommerce-shipping-methods li { margin-bottom: 10px; }
p.woocommerce-shipping-destination { font-weight: 400; margin-bottom: 0px !important; }

.wc-proceed-to-checkout { margin-top: var(--avpro-spacing-md); }
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--avpro-primary);
    color: var(--avpro-white);
    padding: 17px 40px;
    border-radius: var(--avpro-radius-full);
    font-size: var(--avpro-font-lg);
    font-weight: 700;
    text-decoration: none;
    transition: var(--avpro-transition-base);
}
.wc-proceed-to-checkout .checkout-button:hover { background-color: var(--avpro-primary-dark); color: var(--avpro-white); }

@media (max-width: 576px) {
    .cart-totals-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .cart-totals-label { font-size: 0.875rem; }
    .cart-totals-value { text-align: left; width: 100%; }
}

.woocommerce-cart table.cart { border: 1px solid var(--avpro-border); border-radius: var(--avpro-radius); }
.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td { padding: var(--avpro-spacing-md); vertical-align: middle; font-size: 1.125rem; }
.woocommerce-cart table.cart thead { background: var(--avpro-secondary); }
.woocommerce-cart table.cart .product-thumbnail img { border-radius: var(--avpro-radius-md); }
.woocommerce-cart .product-title a { color: var(--avpro-text); text-decoration: none; }
.woocommerce-cart .product-title a:hover { color: var(--avpro-primary); }
.woocommerce-cart .product-subtotal { color: var(--avpro-primary); font-weight: 700; }

/* ==========================================================================
   CHECKOUT
   ========================================================================== */

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading { color: var(--avpro-primary); }

.woocommerce-checkout .woocommerce-form-coupon-toggle {
    background: #f2f2f7;
    padding: var(--avpro-spacing-md);
    border-radius: var(--avpro-radius);
    margin-bottom: var(--avpro-spacing-lg);
}

.woocommerce-checkout #order_review {
    background: #f2f2f7;
    padding: var(--avpro-spacing-md);
    border-radius: var(--avpro-radius);
    margin-bottom: var(--avpro-spacing-lg);
    height: fit-content;
    position: sticky;
    top: 300px;
}

.woocommerce-checkout-review-order { margin-top: var(--avpro-spacing-lg); }

.checkout-review-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--avpro-primary);
    color: var(--avpro-white);
    font-weight: 600;
    border-radius: var(--avpro-radius) var(--avpro-radius) 0 0;
}

.checkout-review-col-name { flex: 1; }
.checkout-review-col-total { flex: 0 0 120px; text-align: right; }

.checkout-review-items {
    background: var(--avpro-white);
    border: 1px solid var(--avpro-border);
    border-top: none;
}

.order-details-wrapper .checkout-review-items {
    border-top: 1px solid var(--avpro-border);
    border-radius: var(--avpro-radius) var(--avpro-radius) 0 0;
}

.checkout-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--avpro-border);
}
.checkout-review-item:last-child { border-bottom: none; }
.checkout-review-item .checkout-review-col-name { flex: 1; }
.checkout-review-item .checkout-review-col-name .product-name { font-weight: 500; color: var(--avpro-text); }
.checkout-review-item .checkout-review-col-name .product-quantity { color: var(--avpro-primary); margin-left: 8px; }
.checkout-review-item .checkout-review-col-total { font-weight: 600; color: var(--avpro-text); }

.checkout-totals-wrapper {
    background: var(--avpro-white);
    border: 1px solid var(--avpro-border);
    border-top: none;
    border-radius: 0 0 var(--avpro-radius) var(--avpro-radius);
    padding: var(--avpro-spacing-md);
}

.checkout-totals-wrapper .cart-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: none;
}
.checkout-totals-wrapper .cart-totals-row:last-child { border-bottom: none; }
.checkout-totals-wrapper .cart-totals-row.order-total {
    font-size: 1.25rem;
    font-weight: 700;
    padding-top: 15px;
    margin-top: 5px;
    border-top: 2px solid var(--avpro-primary);
}
.checkout-totals-wrapper .cart-totals-label { flex: 0 0 auto; font-weight: 400; color: var(--avpro-text); width: fit-content; }
.checkout-totals-wrapper .cart-totals-value { flex: 1; text-align: right; font-weight: 600; }
.checkout-totals-wrapper .shipping .cart-totals-value { text-align: right; }
.checkout-totals-wrapper .cart-totals-row.shipping { border-bottom: none; }
.checkout-totals-wrapper .shipping .cart-totals-value ul { list-style: none; padding: 0; margin: 0; text-align: right; }
ul.wc_payment_methods { margin-top: 1rem; }
.checkout-totals-wrapper .shipping .cart-totals-value li { margin-bottom: 5px; }

.ywraq-customer-information { background-color: #fff; border: 1px solid #e5e5e5 !important; }
.ywraq-customer-information p { margin-bottom: 0 !important; }
.woocommerce-checkout-review-order-wrapper { margin-bottom: 20px; }

@media (max-width: 576px) {
    .checkout-review-header,
    .checkout-review-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .checkout-review-col-total { text-align: left; flex: none; }
    .checkout-totals-wrapper .cart-totals-row { flex-direction: column; gap: 5px; }
    .checkout-totals-wrapper .cart-totals-value { text-align: left; }
}

/* Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error { padding: var(--avpro-spacing-md); border-radius: var(--avpro-radius-sm); margin-bottom: var(--avpro-spacing-lg); }
.woocommerce-message { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.woocommerce-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.woocommerce-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-message,
.woocommerce-cart-form ~ .woocommerce-message,
.woocommerce .woocommerce-message[role="alert"] { display: none !important; }

/* Buttons */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: var(--avpro-primary);
    color: var(--avpro-white);
    border: none;
    padding: 17px 40px;
    border-radius: var(--avpro-radius-full);
    font-size: var(--avpro-font-lg);
    line-height: var(--avpro-line-height-base);
    cursor: pointer;
    transition: var(--avpro-transition-base);
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { background-color: var(--avpro-primary-dark); color: var(--avpro-white); }

.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
    background-color: var(--avpro-primary);
    margin: 0;
    font-size: var(--avpro-font-md) !important;
    padding: 10px 23px !important;
    max-width: 250px;
}

.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover { background-color: var(--avpro-primary-dark); }

.woocommerce div.product form.cart .quantity { margin-right: var(--avpro-spacing-sm); }
.woocommerce .quantity .qty {
    width: 80px;
    padding: 0.5rem;
    border: 3px solid var(--avpro-border);
    border-radius: var(--avpro-radius-round);
    text-align: center;
    font-size: var(--avpro-font-base);
}

.woocommerce .woocommerce-order { background: #f2f2f7; padding: var(--avpro-spacing-lg); border-radius: var(--avpro-radius); margin-top: var(--avpro-spacing-lg); }
.woocommerce-order-details,
.woocommerce-customer-details { margin-top: var(--avpro-spacing-lg); }

.woocommerce span.onsale {
    background: var(--avpro-red);
    color: var(--avpro-white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--avpro-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    position: absolute;
    top: var(--avpro-spacing-sm);
    right: var(--avpro-spacing-sm);
    z-index: 10;
}

.woocommerce .star-rating { color: #ffc107; }

.woocommerce .woocommerce-breadcrumb { margin-bottom: var(--avpro-spacing-lg); padding: var(--avpro-spacing-sm); background: var(--avpro-secondary); border-radius: var(--avpro-radius-sm); }
.woocommerce .woocommerce-breadcrumb a { color: var(--avpro-primary); }
.woocommerce .woocommerce-breadcrumb a:hover { color: var(--avpro-primary-dark); }

/* ==========================================================================
   CATEGORY ARCHIVE LAYOUT
   ========================================================================== */

.avpro-category-archive-layout { display: flex; gap: 40px; align-items: flex-start; }

@media (max-width: 1024px) {
    .avpro-category-archive-layout { flex-direction: column; }
}

.avpro-category-sidebar { flex: 0 0 280px; max-width: 280px; position: sticky; top: 260px; align-self: flex-start; }

@media (max-width: 1024px) {
    .avpro-category-sidebar { flex: 1 1 100%; max-width: 100%; margin-bottom: 30px; position: static; }
}

.avpro-category-widget,
.avpro-product-search-widget,
.avpro-category-nav { background: #f9f9f9; padding: 20px; border-radius: var(--avpro-radius); margin-bottom: 30px; }

.avpro-category-widget .widget-title,
.avpro-product-search-widget .widget-title,
.avpro-category-nav .widget-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #e0e0e0; }

.avpro-product-search-widget .search-submit { margin-top: 10px; }

.product-categories-nav { list-style: none; padding: 0; margin: 0; }
.product-categories-nav > li.category-item { margin-bottom: 10px; list-style: none; }
.category-item { position: relative; }
.category-label { display: flex; align-items: center; justify-content: space-between; }
.category-link { display: block; padding: 8px 12px; color: #333; text-decoration: none; border-radius: 4px; transition: all 0.3s ease; flex: 1; }
.category-link:hover, .category-link:focus { background: #e8e8e8; color: #000; }
.category-item.active > .category-link,
.category-item.active > .category-label > .category-link { background: var(--avpro-primary); color: white; font-weight: 600; }

.menu-caret-btn { background: none; border: none; padding: 8px !important; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; }
.menu-caret { display: block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #666; transition: transform 0.3s ease; }
button:hover .menu-caret { border-top: 6px solid #ffffff; }
.category-label.is-open .menu-caret { transform: rotate(180deg); }

.subcategory-list { list-style: none; padding: 0; margin: 0; padding-left: 10px; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease; }
.subcategory-list.collapsed { max-height: 0; opacity: 0; }
.subcategory-list.expanded { max-height: 2000px; opacity: 1; }
.subcategory-item { margin-bottom: 5px; display: flex; flex-direction: column; list-style: none; }
.subcategory-link { display: block; padding: 6px 10px; color: #555; text-decoration: none; border-radius: 3px; transition: all 0.3s ease; }
.subcategory-link:hover, .subcategory-link:focus { background: #e8e8e8; color: #000; }
.subcategory-item.active > .subcategory-link,
.subcategory-item.active > .category-label > .subcategory-link { background: var(--avpro-primary); color: white; font-weight: 600; }
.subcategory-list.level-3 { padding-left: 15px; }
.subcategory-item.level-3 { font-size: 0.9em; }

.avpro-category-content { flex: 1 1 auto; min-width: 0; }
.avpro-category-content .woocommerce-products-header { margin-bottom: 30px; }
.avpro-category-content .products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

@media (max-width: 1024px) {
    .avpro-category-content .products { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 640px) {
    .avpro-category-content .products { grid-template-columns: 1fr; gap: 15px; }
}

.avpro-category-content .products .product { margin: 0; width: 100%; }

/* ==========================================================================
   ORDERING BAR
   ========================================================================== */

.checkout-form { border-radius: var(--avpro-radius); background: #f2f2f7; padding: 25px; margin-top: var(--avpro-spacing-lg); }
p#order_comments_field { margin-bottom: 0 !important; }

.avpro-ordering-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; padding: 15px 20px; background: #f9f9f9; border-radius: var(--avpro-radius); flex-wrap: wrap; }
.ordering-left, .ordering-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.woocommerce-result-count { margin: 0; font-size: 14px; color: #666; }

.avpro-per-page-selector { display: flex; align-items: center; gap: 8px; }
.avpro-per-page-selector label, .avpro-per-page-selector span { font-size: 14px; color: #666; }
.avpro-per-page-selector select { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; background: white; cursor: pointer; transition: border-color 0.3s ease; }
.avpro-per-page-selector select:hover, .avpro-per-page-selector select:focus { border-color: var(--avpro-primary); outline: none; }

.avpro-view-toggle { display: flex; gap: 5px; border: 1px solid #ddd; border-radius: 4px; background: white; padding: 2px; }
.view-toggle-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; background: transparent; color: #666; cursor: pointer; border-radius: 3px; transition: all 0.3s ease; text-decoration: none; }
.view-toggle-btn:hover { background: #f0f0f0; color: #333; }
.view-toggle-btn.active { background: var(--avpro-primary); color: white; }
.view-toggle-btn svg { display: block; }

.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; background: white; cursor: pointer; min-width: 200px; }
.woocommerce-ordering select:hover, .woocommerce-ordering select:focus { border-color: var(--avpro-primary); outline: none; }

@media (max-width: 768px) {
    .avpro-ordering-bar { flex-direction: column; align-items: stretch; }
    .ordering-left, .ordering-right { width: 100%; justify-content: space-between; }
    .woocommerce-ordering select { width: 100%; }
}

/* ==========================================================================
   LIST VIEW
   ========================================================================== */

body.view-list .woocommerce ul.products,
body.view-list .woocommerce ul.products.columns-3,
body.view-list .avpro-category-content .products { display: flex !important; flex-direction: column !important; gap: 20px !important; grid-template-columns: unset !important; }

body.view-list .woocommerce ul.products li.product,
body.view-list .avpro-category-content .products li.product { display: block !important; text-align: left !important; padding: 20px !important; max-width: 100% !important; width: 100% !important; }

body.view-list .woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
body.view-list .woocommerce ul.products li.product .woocommerce-loop-product__link { display: flex !important; flex-direction: row !important; align-items: flex-start !important; gap: 20px !important; text-decoration: none !important; }

body.view-list .woocommerce ul.products li.product img,
body.view-list .avpro-category-content .products li.product img { flex: 0 0 250px !important; width: 250px !important; max-width: 250px !important; min-width: 250px !important; height: auto !important; object-fit: contain !important; margin: 0 !important; border-radius: var(--avpro-radius-md) !important; }

body.view-list .woocommerce ul.products li.product a.woocommerce-LoopProduct-link > *:not(img),
body.view-list .woocommerce ul.products li.product .woocommerce-loop-product__link > *:not(img) { flex: 1 !important; }

body.view-list .woocommerce ul.products li.product h2,
body.view-list .woocommerce ul.products li.product .woocommerce-loop-product__title { text-align: left !important; margin-bottom: 10px !important; margin-top: 0 !important; }

body.view-list .woocommerce ul.products li.product .price { text-align: left !important; margin-bottom: 15px !important; display: block !important; }

body.view-list .woocommerce ul.products li.product .button,
body.view-list .woocommerce ul.products li.product a.add-request-quote-button { margin-top: 10px !important; display: inline-block !important; }

@media (max-width: 640px) {
    body.view-list .woocommerce ul.products li.product,
    body.view-list .avpro-category-content .products li.product { text-align: center !important; }
    body.view-list .woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
    body.view-list .woocommerce ul.products li.product .woocommerce-loop-product__link { flex-direction: column !important; align-items: center !important; }
    body.view-list .woocommerce ul.products li.product img,
    body.view-list .avpro-category-content .products li.product img { flex: none !important; width: 100% !important; max-width: 100% !important; min-width: unset !important; height: auto !important; }
    body.view-list .woocommerce ul.products li.product h2,
    body.view-list .woocommerce ul.products li.product .woocommerce-loop-product__title,
    body.view-list .woocommerce ul.products li.product .price { text-align: center !important; }
    body.view-list .woocommerce ul.products li.product .button,
    body.view-list .woocommerce ul.products li.product a.add-request-quote-button { display: block !important; margin-left: auto !important; margin-right: auto !important; }
}

/* ==========================================================================
   CART ALERT MESSAGES
   ========================================================================== */

.avpro-already-in-cart,
.avpro-added-to-cart-message,
.yith_ywraq_add_item_product_message,
.yith_ywraq_add_item_response_message,
.yith-ywraq-add-to-quote .alert-success,
[class*="yith_ywraq_add_item_product-response"],
[class*="yith_ywraq_add_item_response-"] {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    font-weight: normal !important;
}

.avpro-already-in-cart a,
.avpro-added-to-cart-message a,
.yith_ywraq_add_item_product_message a,
.yith_ywraq_add_item_response_message a,
.yith-ywraq-add-to-quote .alert-success a,
[class*="yith_ywraq_add_item_product-response"] a,
[class*="yith_ywraq_add_item_response-"] a { color: #155724 !important; text-decoration: underline !important; font-weight: 600 !important; transition: opacity 0.3s ease; }

.avpro-already-in-cart a:hover,
.avpro-added-to-cart-message a:hover,
.yith_ywraq_add_item_product_message a:hover,
.yith_ywraq_add_item_response_message a:hover,
.yith-ywraq-add-to-quote .alert-success a:hover,
[class*="yith_ywraq_add_item_product-response"] a:hover,
[class*="yith_ywraq_add_item_response-"] a:hover { opacity: 0.8; color: #0c3d14 !important; }

.avpro-adding-to-cart { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; border-radius: 4px; padding: 12px 15px; margin-top: 10px; font-size: 14px; line-height: 1.5; text-align: center; }

.woocommerce ul.products li.product .added_to_cart { display: none !important; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.woocommerce-pagination { margin-top: 40px; margin-bottom: 40px; }
.woocommerce-pagination ul.page-numbers { display: flex; justify-content: center; align-items: center; gap: 5px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.woocommerce-pagination ul.page-numbers li { list-style: none; margin: 0; padding: 0; }
.woocommerce-pagination ul.page-numbers li a.page-numbers,
.woocommerce-pagination ul.page-numbers li span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0.375rem 0.75rem; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--avpro-primary); text-decoration: none; background-color: #fff; border: 1px solid #dee2e6; border-radius: 4px; transition: all 0.3s ease; }
.woocommerce-pagination ul.page-numbers li a.page-numbers:hover { color: var(--avpro-primary-dark); background-color: #e9ecef; border-color: #dee2e6; }
.woocommerce-pagination ul.page-numbers li span.page-numbers.current { color: #fff; background-color: var(--avpro-primary); border-color: var(--avpro-primary); font-weight: 600; pointer-events: none; }
.woocommerce-pagination ul.page-numbers li span.page-numbers.dots { color: #6c757d; background-color: transparent; border: 1px solid transparent; pointer-events: none; }
.woocommerce-pagination ul.page-numbers li a.prev,
.woocommerce-pagination ul.page-numbers li a.next { font-weight: 600; color: var(--avpro-primary); }
.woocommerce-pagination ul.page-numbers li a.prev:hover,
.woocommerce-pagination ul.page-numbers li a.next:hover { background-color: var(--avpro-primary); color: #fff; border-color: var(--avpro-primary); }

@media (max-width: 576px) {
    .woocommerce-pagination ul.page-numbers { gap: 3px; }
    .woocommerce-pagination ul.page-numbers li a.page-numbers,
    .woocommerce-pagination ul.page-numbers li span.page-numbers { min-width: 36px; height: 36px; padding: 0.25rem 0.5rem; font-size: 13px; }
}

/* ==========================================================================
   SOCIAL SHARE
   ========================================================================== */

.product-social-share { display: flex; align-items: center; gap: 12px; margin-top: var(--avpro-spacing-md); padding-top: var(--avpro-spacing-md); border-top: 1px solid var(--avpro-border); }
.product-social-share .share-label { font-weight: 600; color: var(--avpro-text); font-size: 14px; }
.product-social-share .share-buttons { display: flex; gap: 8px; }
.product-social-share .share-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background-color: transparent; border: 2px solid var(--avpro-primary); border-radius: 50%; color: var(--avpro-primary); text-decoration: none; cursor: pointer; font-family: inherit; transition: all var(--avpro-transition-base, 0.2s ease); }
.product-social-share .share-btn:hover { background-color: var(--avpro-primary); color: var(--avpro-white, #fff); transform: translateY(-2px); box-shadow: var(--avpro-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.1)); }
.product-social-share .share-btn:active { transform: translateY(0); }
.product-social-share .share-btn svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
    .product-social-share { flex-direction: column; align-items: flex-start; gap: 8px; }
    .product-social-share .share-btn { width: 36px; height: 36px; }
    .product-social-share .share-btn svg { width: 16px; height: 16px; }
}

/* ==========================================================================
   RENTAL CART
   ========================================================================== */

.rental-cart-items-wrapper { background: var(--avpro-white); border: 1px solid var(--avpro-border); border-radius: var(--avpro-radius); overflow: hidden; }
.rental-cart-header { display: flex; align-items: center; gap: 15px; padding: 15px 20px; background: var(--avpro-primary); font-weight: 600; }

@media (min-width: 992px) {
    .rental-cart-header,
    .rental-cart-item { display: grid; grid-template-columns: 150px 1fr 120px 150px 120px 60px; gap: 20px; align-items: center; }
}

.rental-cart-item { display: flex; flex-wrap: wrap; gap: 15px; padding: 20px; border-bottom: 1px solid var(--avpro-border); transition: background-color 0.3s ease; }
.rental-cart-item:last-child { border-bottom: none; }
.rental-cart-item:hover { background-color: #ffffff; }
.rental-cart-col { display: flex; align-items: center; }
.rental-cart-col-thumbnail { flex: 0 0 150px; }
.rental-cart-col-thumbnail .rental-cart-product-image { display: block; max-width: 150px; max-height: 150px; overflow: hidden; border-radius: var(--avpro-radius-md); }
.rental-cart-col-thumbnail img { width: 100%; height: auto; max-height: 150px; object-fit: contain; border-radius: var(--avpro-radius-md); }
.rental-cart-col-name { flex: 1; min-width: 200px; }
.rental-cart-col-name .product-title { font-size: 1.125rem; margin-bottom: 5px; }
.rental-cart-col-name .product-title a { color: var(--avpro-text); text-decoration: none; transition: color 0.3s ease; }
.rental-cart-col-name .product-title a:hover { color: var(--avpro-primary); }
.rental-cart-col-name .variation-data, .rental-cart-col-name .product-meta { margin-top: 8px; font-size: 0.9rem; color: #666; }
.rental-cart-col-name .variation-item, .rental-cart-col-name .meta-item { margin: 3px 0; font-size: 0.875rem; }
.rental-cart-col-price { flex: 0 0 120px; font-size: 1.125rem; font-weight: 600; color: #fff; }
.rental-cart-col-quantity { flex: 0 0 150px; color: #fff; }
.rental-cart-col-quantity .qty { width: 80px; padding: 0.5rem; border: 3px solid var(--avpro-border); border-radius: var(--avpro-radius-round); text-align: center; font-size: var(--avpro-font-base); }
.rental-cart-col-quantity .quantity-display { font-size: 1.125rem; font-weight: 600; color: #fff; }
.rental-cart-col-subtotal { flex: 0 0 160px; font-size: 1.125rem; font-weight: 700; color: #fff; white-space: nowrap; }
.rental-cart-col-remove .remove-request-quote-item { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: #dc3545; font-size: 24px; text-decoration: none; border-radius: 50%; transition: all 0.3s ease; }
.rental-cart-col-remove .remove-request-quote-item:hover { background-color: #dc3545; color: white; }

@media (max-width: 991px) {
    .rental-cart-header { display: none; }
    .rental-cart-item { display: grid; grid-template-columns: 120px 1fr; grid-template-areas: "thumbnail name" "thumbnail price" "thumbnail quantity" "thumbnail subtotal" "thumbnail remove"; gap: 10px 15px; padding: 15px; }
    .rental-cart-col-thumbnail { grid-area: thumbnail; flex: none; }
    .rental-cart-col-thumbnail .rental-cart-product-image, .rental-cart-col-thumbnail img { max-width: 120px; max-height: 120px; }
    .rental-cart-col-name { grid-area: name; min-width: 0; }
    .rental-cart-col-price { grid-area: price; }
    .rental-cart-col-quantity { grid-area: quantity; }
    .rental-cart-col-subtotal { grid-area: subtotal; }
    .rental-cart-col-remove { grid-area: remove; }
    .rental-cart-col[data-label]:not([data-label=""]):before { content: attr(data-label) ": "; font-weight: 600; margin-right: 5px; color: var(--avpro-text); }
    .rental-cart-col-name, .rental-cart-col-price, .rental-cart-col-quantity, .rental-cart-col-subtotal, .rental-cart-col-remove { flex: none; width: 100%; }
}

@media (max-width: 576px) {
    .rental-cart-item { grid-template-columns: 1fr; grid-template-areas: "thumbnail" "name" "price" "quantity" "subtotal" "remove"; text-align: center; }
    .rental-cart-col-thumbnail { justify-content: center; }
    .rental-cart-col-thumbnail .rental-cart-product-image { max-width: 100%; max-height: 200px; }
    .rental-cart-col-thumbnail img { max-width: 100%; max-height: 200px; }
}

.rental-cart-actions { display: flex; justify-content: flex-end; gap: 15px; padding: 20px; background: #fff3cd; border-radius: var(--avpro-radius); margin-top: 20px; }
@media (max-width: 576px) { .rental-cart-actions { flex-direction: column; } .rental-cart-actions button { width: 100%; } }
.rental-cart-actions .update-request-quote { background-color: #ffc107; color: #000; border: none; padding: 17px 40px; border-radius: var(--avpro-radius-full); font-size: var(--avpro-font-lg); font-weight: 600; cursor: pointer; transition: var(--avpro-transition-base); }
.rental-cart-actions .update-request-quote:hover { background-color: #e0a800; color: #000; }
.checkout-inline-error-message { color: #dc3545; }

/* ==========================================================================
   UPSELLS / RELATED PRODUCTS
   ========================================================================== */

.upsells.products ul.products,
.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: var(--avpro-spacing-md) !important;
    align-items: start !important;
}

.upsells.products ul.products li.product,
.related.products ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    aspect-ratio: 2 / 3 !important;
    overflow: hidden !important;
}

.upsells.products ul.products li.product img,
.related.products ul.products li.product img {
    flex: 0 0 50% !important;
    height: 50% !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    max-height: none !important;
}

.upsells.products ul.products li.product .woocommerce-loop-product__title,
.related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.8rem !important;
    margin: 4px 0 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.upsells.products ul.products li.product .price,
.related.products ul.products li.product .price {
    margin: 2px 0 !important;
    font-size: 0.9rem !important;
}

.upsells.products ul.products li.product .button,
.upsells.products ul.products li.product .yith-ywraq-add-button,
.related.products ul.products li.product .button,
.related.products ul.products li.product .yith-ywraq-add-button {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    margin-top: auto !important;
}

@media (max-width: 767px) {
    .upsells.products ul.products,
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================================================
   MISC
   ========================================================================== */

.select2-container--default .select2-selection--single { height: 56px; border: 1px solid #e5e5e5; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 56px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 52px; }
.form-row.form-row-first { width: 48%; float: left; clear: both; }
.form-row.form-row-last { width: 48%; float: right; }
.woocommerce-error a { color: #dc3545; }
.woocommerce-MyAccount-navigation { display: none; }
.ywraq-view-quote-wrapper p { margin-left: 0 !important; }