/* WooCommerce supplemental */
.woocommerce-message,.woocommerce-info,.woocommerce-error{padding:12px 16px;border-radius:4px;margin-bottom:20px;}
.woocommerce-message{background:#d4edda;border-left:4px solid #28a745;color:#155724;}
.woocommerce-error{background:#f8d7da;border-left:4px solid #dc3545;color:#721c24;}
.woocommerce-info{background:#d1ecf1;border-left:4px solid #17a2b8;color:#0c5460;}
.woocommerce form .form-row label{display:block;margin-bottom:4px;font-weight:600;font-size:.88rem;}
.woocommerce form .form-row input,.woocommerce form .form-row textarea,.woocommerce form .form-row select{width:100%;padding:9px 12px;border:1px solid #ddd;border-radius:4px;font-size:.9rem;font-family:inherit;outline:none;transition:border-color .2s;}
.woocommerce form .form-row input:focus{border-color:var(--primary,#d62b2b);}
.woocommerce button.button,.woocommerce input.button,.woocommerce a.button{display:inline-block;padding:10px 22px;background:var(--btn-color,#0057b8);color:#fff!important;border:none;border-radius:4px;font-weight:700;cursor:pointer;transition:background .2s;}
.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce a.button:hover{background:var(--btn-color-dk,#003d82);}
.woocommerce button.button.alt{background:var(--btn-color,#0057b8);}
.woocommerce .quantity input{width:70px;padding:8px;border:1px solid #ddd;border-radius:4px;text-align:center;}
.woocommerce-cart table.cart td,.woocommerce-cart table.cart th{padding:12px;border-bottom:1px solid #eee;}
.woocommerce-cart .cart_totals{background:#f9f9f9;padding:20px;border-radius:8px;}

/* ── Cart and checkout: extra breathing room on sides ── */
.woocommerce-cart .site-content .container,
.woocommerce-checkout .site-content .container {
    padding-left: 50px !important;
    padding-right: 50px !important;
}
.woocommerce #payment{background:#f9f9f9;padding:20px;border-radius:8px;}
.single-product .product_title{font-size:1.6rem;font-weight:800;margin-bottom:12px;}
.single-product .price{font-size:1.4rem;font-weight:700;color:var(--primary,#d62b2b);margin-bottom:16px;}
.single-product .woocommerce-product-details__short-description{margin-bottom:20px;color:#555;}

/* ── Single product gallery — constrain image height so it doesn't overpower layout ── */
.single-product .woocommerce-product-gallery {
    max-width: 100%;
}
.single-product .woocommerce-product-gallery__image img,
.single-product .woocommerce-product-gallery__image > a > img {
    max-height: 420px;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
/* Thumbnail strip — tighter gap, 90px size */
.single-product ol.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px !important;
    padding: 8px 0 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
.single-product ol.flex-control-thumbs li {
    margin: 0 !important;
    width: 90px !important;
    height: 90px !important;
    flex-shrink: 0;
}
.single-product .flex-control-thumbs li img {
    width: 90px !important;
    height: 90px !important;
    max-height: none;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

/* ── Plugin button area inside product cards (YITH wishlist, compare, quick view) ── */
.pc-body .yith-wcwl-add-to-wishlist,
.pc-body .compare-button,
.pc-body .yith-wcqv-button,
.pc-body .button { display:block; width:100%; text-align:center; }

/* YITH wishlist icon button */
.yith-wcwl-add-to-wishlist { margin-top:6px; }
.yith-wcwl-add-to-wishlist a { color:var(--primary,#d62b2b); font-size:.8rem; display:flex; align-items:center; justify-content:center; gap:4px; }
.yith-wcwl-add-to-wishlist a:hover { text-decoration:underline; }

/* WC default loop item title (used when woocommerce_shop_loop_item_title fires) */
.woocommerce-loop-product__title { font-size:.92rem !important; font-weight:600 !important; margin:0 0 6px !important; color:#222 !important; }

/* Add to cart button from WC hooks */
.abc-grid .add_to_cart_button,
.abc-grid .product_type_simple,
.abc-grid .product_type_variable,
.abc-grid .product_type_grouped {
    display:block;
    width:100%;
    text-align:center;
    padding:9px;
    background:var(--btn-color,#0057b8);
    color:#fff !important;
    border-radius:4px;
    font-size:.84rem;
    font-weight:600;
    margin-top:auto;
    border:none;
    cursor:pointer;
    transition:background .2s;
}
.abc-grid .add_to_cart_button:hover { background:var(--btn-color-dk,#003d82); }

/* Star ratings */
.star-rating { color:var(--primary,#d62b2b); font-size:.82rem; margin-bottom:4px; }

/* ── Hide wishlist/heart on product grids — show only on single product + wishlist page ── */
.yith-wcwl-add-to-wishlist,
.yith-wcwl-add-button,
.yith-wcwl-shortcode,
[class*="yith-wcwl"],
.add-to-wishlist-button { display: none !important; }

/* Restore on single product page */
.single-product .yith-wcwl-add-to-wishlist,
.single-product .yith-wcwl-add-button,
.single-product [class*="yith-wcwl"],
.single-product .add-to-wishlist-button { display: block !important; }

/* Restore on wishlist page — everything must be visible */
.page-template-default.woocommerce-wishlist .yith-wcwl-add-to-wishlist,
.page-template-default.woocommerce-wishlist .yith-wcwl-add-button,
.page-template-default.woocommerce-wishlist [class*="yith-wcwl"],
.page-template-default.woocommerce-wishlist .add-to-wishlist-button,
.woocommerce-wishlist [class*="yith-wcwl"],
.woocommerce-wishlist .yith-wcwl-add-to-wishlist,
.woocommerce-wishlist .yith-wcwl-add-button,
.woocommerce-wishlist table,
.woocommerce-wishlist td,
.woocommerce-wishlist tr { display: revert !important; }

/* ── Shop subcategory tiles ── */
.shop-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 8px;
    padding: 0;
}
.shop-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: .82rem;
    font-weight: 600;
    transition: border-color .2s, background .2s;
    min-width: 80px;
    text-align: center;
}
.shop-cat-tile img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}
.shop-cat-tile:hover,
.shop-cat-tile.active {
    border-color: var(--primary, #d62b2b);
    background: #fff;
    color: var(--primary, #d62b2b);
}

/* ── Shop layout with optional sidebar ── */
.shop-layout { display: block; margin-top: 24px; }

/* Sidebar RIGHT (default) */
.shop-layout.has-sidebar.sidebar-right { display: grid; grid-template-columns: 1fr 260px; gap: 30px; align-items: start; }
.shop-layout.has-sidebar.sidebar-right .shop-main  { order: 1; }
.shop-layout.has-sidebar.sidebar-right .shop-sidebar { order: 2; }

/* Sidebar LEFT */
.shop-layout.has-sidebar.sidebar-left { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }
.shop-layout.has-sidebar.sidebar-left .shop-main  { order: 2; }
.shop-layout.has-sidebar.sidebar-left .shop-sidebar { order: 1; }

/* Legacy fallback — has-sidebar with no direction class defaults to right */
.shop-layout.has-sidebar:not(.sidebar-left):not(.sidebar-right) { display: grid; grid-template-columns: 1fr 260px; gap: 30px; align-items: start; }

.shop-main { min-width: 0; }
.shop-sidebar { background: #f9f9f9; border-radius: 8px; padding: 20px; }
.shop-widget { margin-bottom: 24px; }
.shop-widget:last-child { margin-bottom: 0; }
.shop-widget-title { font-size: .95rem; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary, #d62b2b); }

/* Hide subcategory tiles — they have both .product AND .product-category classes */
.woocommerce ul.products li.product-category,
.woocommerce-page ul.products li.product-category { display: none !important; }

@media ( max-width: 768px ) {
    .shop-layout.has-sidebar.sidebar-right,
    .shop-layout.has-sidebar.sidebar-left,
    .shop-layout.has-sidebar:not(.sidebar-left):not(.sidebar-right) { grid-template-columns: 1fr; }
    .shop-layout.has-sidebar .shop-sidebar { order: -1; }
}
