/* ============================================================
   OLD ROOTZ UI ENHANCER - Public Stylesheet
   SAFE ENHANCEMENTS ONLY — does NOT override theme structure
   ============================================================ */

/* ─── SHOP PAGE: FILTER BAR ─────────────────────────────────── */
.orui-filter-bar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.orui-filter-bar-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.orui-filter-bar-sorting {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Style the sort select inside our bar */
.orui-filter-bar-sorting select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #374151;
    background: #fafafa;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.orui-filter-bar-sorting select:focus {
    border-color: #1a1a1a;
}

/* Suppress the WooCommerce ordering that renders OUTSIDE our wrapper */
.woocommerce .woocommerce-ordering {
    float: none;
    margin: 0;
}

/* ─── SHOP PAGE: RESULTS COUNT ──────────────────────────────── */
.woocommerce .woocommerce-result-count {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

/* ─── SHOP PAGE: PRODUCT CARDS ──────────────────────────────── */

/* Only apply grid on shop/archive, NOT on single product related products area */
.woocommerce:not(.single-product) ul.products,
body.archive ul.products,
body.tax-product_cat ul.products,
body.post-type-archive-product ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .woocommerce:not(.single-product) ul.products,
    body.archive ul.products,
    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .woocommerce:not(.single-product) ul.products,
    body.archive ul.products,
    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Card base styling */
.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
}

.woocommerce ul.products li.product:hover {
    border-color: #c8c8c8;
    box-shadow: 0 8px 28px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}

/* Product Image */
.woocommerce ul.products li.product a img {
    transition: transform 0.3s ease;
    display: block;
}
.woocommerce ul.products li.product:hover a img {
    transform: scale(1.03);
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    padding: 0 !important;
    margin: 12px 16px 6px !important;
}

/* Product Price on card */
.woocommerce ul.products li.product .price {
    font-size: 15px;
    font-weight: 700;
    margin: 0 16px 6px !important;
    display: block;
}
.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    font-weight: 700;
}
.woocommerce ul.products li.product .price del {
    font-size: 12px;
    color: #9ca3af;
    margin-right: 4px;
    font-weight: 400;
}

/* Short Description on card (ORUI custom element) */
.orui-card-excerpt {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 16px 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Add to Cart Button on card */
.woocommerce ul.products li.product .button.add_to_cart_button,
.woocommerce ul.products li.product .button.product_type_simple,
.woocommerce ul.products li.product .button.product_type_variable {
    display: block !important;
    width: calc(100% - 24px) !important;
    margin: 8px 12px 12px !important;
    padding: 9px 12px !important;
    text-align: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-radius: 8px !important;
    border: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
}

@media (max-width: 768px) {
    .woocommerce ul.products li.product .button.add_to_cart_button,
    .woocommerce ul.products li.product .button.product_type_simple,
    .woocommerce ul.products li.product .button.product_type_variable {
        font-size: 11px !important;
        padding: 8px 10px !important;
        margin: 6px 10px 10px !important;
        width: calc(100% - 20px) !important;
        letter-spacing: 0.2px;
    }
}

/* Sale badge */
.woocommerce ul.products li.product .onsale {
    top: 12px;
    left: 12px;
    right: auto;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    z-index: 2;
}

/* Wishlist icon */
.woocommerce ul.products li.product .yith-wcwl-add-to-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* ─── MOBILE FILTER BUTTON ───────────────────────────────────── */
.orui-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
}
.orui-mobile-filter-btn:hover { background: #333; }

@media (max-width: 768px) {
    .orui-mobile-filter-btn { display: flex; }
    .orui-filter-bar-wrapper { display: none !important; }
}

/* ─── MOBILE SIDEBAR ─────────────────────────────────────────── */
.orui-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.orui-sidebar-overlay.orui-active {
    opacity: 1;
    visibility: visible;
}

.orui-mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.orui-mobile-sidebar.orui-active { transform: translateX(0); }

.orui-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
}
.orui-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.orui-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    color: #6b7280;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.orui-sidebar-close:hover { background: #f3f4f6; color: #1a1a1a; }

.orui-sidebar-body { padding: 20px; }
.orui-sidebar-body .widget { margin-bottom: 20px; }
.orui-sidebar-body .widget-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.orui-sidebar-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    color: #92400e;
}

/* ─── SINGLE PRODUCT PAGE — SAFE ENHANCEMENTS ONLY ──────────────
   We do NOT override the theme's .product flex/grid layout.
   We only style individual elements inside the summary area.
   ────────────────────────────────────────────────────────────── */

/* Price styling — safe, doesn't change layout */
.single-product p.price ins,
.single-product div.price ins {
    text-decoration: none !important;
}
.single-product p.price del,
.single-product div.price del {
    color: #9ca3af !important;
    font-weight: 400;
}

/* Short description */
.single-product .woocommerce-product-details__short-description {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
}
.single-product .woocommerce-product-details__short-description p {
    margin-bottom: 10px;
}

/* Variations table */
.single-product table.variations {
    border: none !important;
}
.single-product table.variations td,
.single-product table.variations th {
    border: none !important;
    vertical-align: middle;
    padding: 6px 0;
}
.single-product table.variations label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.single-product table.variations select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 160px;
    outline: none;
}
.single-product table.variations select:focus {
    border-color: #1a1a1a;
}

/* Variation swatches (woo-variation-swatches plugin) */
.single-product .variable-items-wrapper .variable-item {
    border-radius: 8px !important;
    border: 2px solid #e5e7eb !important;
    transition: all 0.2s !important;
}
.single-product .variable-items-wrapper .variable-item.selected,
.single-product .variable-items-wrapper .variable-item:hover {
    border-color: #1a1a1a !important;
}

/* Qty input */
.single-product .quantity .qty {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}
.single-product .quantity .qty:focus {
    border-color: #1a1a1a;
}

/* Add to Cart button on product page */
.single-product button.single_add_to_cart_button,
.single-product .single_add_to_cart_button.button {
    padding: 13px 28px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    font-family: inherit !important;
}

/* Trust Badges */
.orui-trust-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin: 16px 0;
}
.orui-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.orui-badge svg {
    flex-shrink: 0;
}

/* Let the gallery wrapper dictate height dynamically */
.single-product .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 650px !important;
    margin: 0 auto !important;
    height: auto !important;
}

/* Remove strict heights/widths from Flexslider image items that cause whitespace */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
    width: 100%;
    height: auto;
}

/* Ensure main image fills available space with auto height */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Gallery thumbnail styling is now handled directly by the active theme (single-product-page.php) */

/* Tabs - minimal safe styling */
.single-product .woocommerce-tabs ul.tabs li {
    background: none !important;
    border-radius: 0 !important;
}

/* ─── RESPONSIVE: Mobile badge gap ────────────────── */
@media (max-width: 768px) {
    .orui-trust-badges { gap: 10px; }
}
