/**
 * Wholesale Catalog Styles
 *
 * Styles for the wholesale catalog system including badges,
 * pricing display, action buttons, and responsive adjustments.
 *
 * @package Goya_Child
 */

/* ==============================================
   HIDE PARENT THEME FILTERS
   ============================================== */

/* Hide parent theme's default filter buttons on shop page ONLY */
body.woocommerce-shop #et-shop-filters,
body.woocommerce-shop #et-shop-filters-header,
body.woocommerce-shop .filter-trigger,
body.woocommerce-shop .shop-filters-btn,
body.woocommerce-shop .et-woocommerce-filter-btn,
body.woocommerce-shop .product-filter-button,
body.woocommerce-shop .shop-filter-trigger,
body.woocommerce-shop .shop-header a[href*="filter"],
body.woocommerce-shop .product-archive-header a[href*="filter"],
body.woocommerce-shop .page-header a[href*="filter"],
body.woocommerce-shop header a[href*="filter"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Hide the floating shop filter button ONLY on shop page */
body.woocommerce-shop .shop-sidebar-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure our Filters link next to sorting is VISIBLE on shop page */
body.woocommerce-shop .shop-filters-trigger {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

/* ==============================================
   WHOLESALE CATALOG SPECIFIC OVERRIDES
   ============================================== */

/* Wholesale Catalog - Hide duplicate header filter button */
body:has(#wholesale-side-filters) #et-shop-filters-header,
body:has(#wholesale-side-filters) .shop-header-filter,
body:has(#wholesale-side-filters) .filter-top {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Hide separator lines/elements in shop header on wholesale catalog */
body:has(#wholesale-side-filters) .shop_bar .separator,
body:has(#wholesale-side-filters) .shop-bar-separator,
body:has(#wholesale-side-filters) .shop-header-separator,
body:has(#wholesale-side-filters) .shop_bar_right span:empty {
    display: none !important;
}

/* ==============================================
   SHOP BAR STYLING
   ============================================== */

.shop_bar {
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.shop_bar_right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ==============================================
   WHOLESALE BADGES
   ============================================== */

.wholesale-badge,
.b2b-only-badge {
    position: absolute;
    top: 10px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wholesale-badge {
    left: 10px;
    background: #282828;
    color: white;
    cursor: pointer;
    text-decoration: none;
}

.b2b-only-badge {
    right: 10px;
    background: #28a745;
    color: white;
}

/* ==============================================
   WHOLESALE PRICING DISPLAY
   ============================================== */

.wholesale-price.amount {
    font-size: 1.5em;
    font-weight: 700;
    color: #282828;
}

/* ==============================================
   WHOLESALE ACTION BUTTONS
   ============================================== */

.wholesale-quote-btn {
    background: #282828 !important;
    color: white !important;
    border-color: #282828 !important;
}

.wholesale-quote-btn:hover {
    background: #824d77 !important;
    border-color: #824d77 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 40, 40, 0.3);
}

/* ==============================================
   PRODUCT CARD HOVER EFFECTS
   ============================================== */

.shop-container .product-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* ==============================================
   DESKTOP LAYOUT OVERRIDES
   ============================================== */

/* Match /shop page width.
 * The shop page (archive-product.php) renders .shop-products.container
 * directly inside .site-content with no parent col constraint.
 * This page uses page.php which wraps content in .col-lg-8 (66% wide).
 * Override .main-content to be 12/12 cols so .shop-products.container
 * gets the same natural Bootstrap container width as the shop page.
 */
@media (min-width: 769px) {
    body.page-id-1932 .main-content {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ==============================================
   MOBILE LAYOUT OVERRIDES
   ============================================== */

/* Zero row padding — the col's natural 15px handles
 * the indent via the external CSS mobile overrides.
 */
@media (max-width: 768px) {
    body.page-id-1932 .shop-products .row {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ==============================================
   WHOLESALE CATALOG PAGE HIDES
   ============================================== */

/* Hide reviews section on wholesale catalog page */
body.page-id-1932 .reviews,
body.page-id-1932 .comments-area,
body.page-id-1932 #reviews,
body.page-id-1932 #comments,
body.page-id-1932 .review-form-wrapper,
body.page-id-1932 .woocommerce-Reviews {
    display: none !important;
}

/* Hide wishlist and wholesale badge on wholesale catalog listing */
body.page-id-1932 .yith-wcwl-add-to-wishlist,
body.page-id-1932 .goya_wishlist_button,
body.page-id-1932 .wholesale-badge,
body.page-id-1932 .product_thumbnail .wholesale-badge,
body.page-id-1932 .actions-wrapper .wholesale-badge {
    display: none !important;
}

/* Hide Quick View buttons on wholesale catalog listing */
body.page-id-1932 .quick-view-button,
body.page-id-1932 .goya_loop_quick_view,
body.page-id-1932 .product_thumbnail .quick-view,
body.page-id-1932 .actions-wrapper .quick-view-button,
body.page-id-1932 .quick-view,
body.page-id-1932 .show-quick-view,
body.page-id-1932 .product-inner .quick-view-button,
body.page-id-1932 a.quick-view-button,
body.page-id-1932 .product_thumbnail a[href*="quick-view"],
body.page-id-1932 .actions-wrapper a {
    display: none !important;
}

/* Hide entire actions wrapper if it only contains quick view */
body.page-id-1932 .actions-wrapper {
    display: none !important;
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */

@media (max-width: 768px) {
    .wholesale-price.amount {
        font-size: 1.2em;
    }

    .wholesale-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .wholesale-actions .button {
        width: 100% !important;
        padding: 10px 16px !important;
    }
}
