/*
Theme Name: Barceff
Theme URI: https://barceff.com/
Description: Barceff — тема за WooCommerce (магазин, единичен продукт със свързани продукти, количка и каса) в дизайна на сайта на Бърцеф ЕООД. Изисква WooCommerce.
Author: Barceff
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
WC requires at least: 7.0
Text Domain: barceff
*/

/* The Barceff base design lives in base.css (a copy of the site's styles.css),
   enqueued before this file. Below are only the WooCommerce-specific styles. */

/* ---------- WooCommerce wrapper ---------- */
.wc-wrap{padding-bottom:20px}
.woocommerce-message,.woocommerce-info,.woocommerce-error,.woocommerce-notices-wrapper .wc-block-components-notice-banner{
  border:1px solid var(--line);border-left:4px solid var(--blue);background:#f4fafe;border-radius:12px;
  padding:14px 18px;margin-bottom:20px;list-style:none;color:#234}
.woocommerce-error{border-left-color:#c0392b;background:#fdf3f2}
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit,
.woocommerce a.button.alt,.woocommerce button.button.alt{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--blue-vivid);color:#fff;
  font-weight:700;font-size:15px;letter-spacing:-0.01em;border:none;border-radius:12px;padding:12px 24px;cursor:pointer;
  transition:transform .15s,box-shadow .15s,background .15s;text-decoration:none}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover{
  background:var(--blue);transform:translateY(-2px);box-shadow:0 14px 28px rgba(25,138,190,.32)}
.woocommerce .button.added{background:var(--blue)}
.woocommerce-result-count{color:var(--gray);font-size:14px;margin:0 0 16px}
.woocommerce .woocommerce-ordering select,.woocommerce select,.woocommerce .input-text,
.woocommerce input[type=text],.woocommerce input[type=email],.woocommerce input[type=tel],
.woocommerce input[type=password],.woocommerce input[type=number],.woocommerce textarea{
  border:1px solid #d8dee6;border-radius:10px;padding:11px 14px;font-family:inherit;font-size:15px;
  color:#222;background:#fbfcfd}
.woocommerce input:focus,.woocommerce select:focus,.woocommerce textarea:focus{
  outline:none;border-color:var(--blue-bright);box-shadow:0 0 0 3px rgba(0,173,238,.15)}

/* ---------- Shop grid (native WooCommerce markup) ---------- */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;margin:0 0 30px;padding:0;list-style:none}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
.woocommerce ul.products li.product{display:flex;flex-direction:column;margin:0;padding:0 0 18px;text-align:left;
  width:auto !important;float:none !important;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;
  box-shadow:0 14px 34px rgba(0,0,0,.06);transition:transform .18s,box-shadow .18s}
.woocommerce ul.products li.product:hover{transform:translateY(-4px);box-shadow:0 22px 50px rgba(0,0,0,.12)}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{display:flex;flex-direction:column;color:inherit;flex:1 1 auto}
.woocommerce ul.products li.product a img{margin:0 0 12px;border-radius:0;background:#f4f6f8;aspect-ratio:4/3;object-fit:cover;width:100%}
.woocommerce ul.products li.product .woocommerce-loop-product__title{padding:0 18px;margin:0 0 6px;font-size:16px;font-weight:700;color:#111;letter-spacing:-0.01em;line-height:1.3}
.woocommerce ul.products li.product .price{padding:0 18px;margin:auto 0 0;color:var(--blue);font-weight:800;font-size:17px}
.woocommerce ul.products li.product .price del{color:var(--gray);font-weight:500;font-size:14px;margin-right:6px}
.woocommerce ul.products li.product .price ins{text-decoration:none}
.wc-unit{color:var(--gray);font-weight:500;font-size:13px}
.woocommerce ul.products li.product .star-rating{margin:0 18px 6px;font-size:13px}
.woocommerce ul.products li.product .button,.woocommerce ul.products li.product .added_to_cart{margin:14px 18px 0;width:calc(100% - 36px)}
.woocommerce nav.woocommerce-pagination ul{border:none;display:flex;gap:8px;justify-content:center;margin-top:10px}
.woocommerce nav.woocommerce-pagination ul li{border:none}
.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span{
  border:1px solid var(--line);border-radius:10px;padding:8px 14px;color:#333}
.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--blue);color:#fff;border-color:var(--blue)}

/* ---------- Single product ---------- */
.woocommerce div.product{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,4vw,52px)}
.woocommerce div.product .woocommerce-product-gallery{margin:0;float:none;width:auto}
.woocommerce div.product .woocommerce-product-gallery img{border-radius:16px}
.woocommerce div.product .summary{margin:0;float:none;width:auto}
.woocommerce div.product .product_title{font-size:clamp(24px,3vw,38px);font-weight:800;letter-spacing:-0.02em;color:#000;margin:0 0 12px}
.woocommerce div.product p.price,.woocommerce div.product span.price{color:var(--blue);font-size:clamp(22px,2.6vw,30px);font-weight:800;margin-bottom:16px}
.woocommerce div.product .woocommerce-product-details__short-description{color:#444;line-height:1.6;margin-bottom:20px}
.woocommerce div.product form.cart{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:22px}
.woocommerce div.product form.cart .quantity input.qty{width:72px;text-align:center}
.woocommerce .product_meta{font-size:13px;color:var(--gray)}
.woocommerce div.product .woocommerce-tabs ul.tabs{padding:0;margin:34px 0 0;border-bottom:2px solid var(--line);display:flex;gap:6px}
.woocommerce div.product .woocommerce-tabs ul.tabs::before{display:none}
.woocommerce div.product .woocommerce-tabs ul.tabs li{background:none;border:none;border-radius:10px 10px 0 0;margin:0}
.woocommerce div.product .woocommerce-tabs ul.tabs li a{font-weight:700;color:#445;padding:10px 18px}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:var(--blue)}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active{box-shadow:none;border-bottom:3px solid var(--blue)}

/* ---------- Related / upsells grid ---------- */
.woocommerce .related.products,.woocommerce .upsells.products{margin-top:48px;clear:both}
.woocommerce .related.products>h2,.woocommerce .upsells.products>h2{font-size:clamp(22px,2.6vw,30px);font-weight:800;letter-spacing:-0.02em;margin:0 0 22px;color:#000}
.woocommerce .related.products ul.products,.woocommerce .upsells.products ul.products{grid-template-columns:repeat(4,1fr)}

/* ---------- Cart ---------- */
.woocommerce table.shop_table{border:1px solid var(--line);border-radius:14px;border-collapse:separate;overflow:hidden}
.woocommerce table.shop_table th{background:#f6f8fa;color:#222;font-weight:700}
.woocommerce table.cart img{width:64px;border-radius:8px}
.woocommerce .cart_totals h2{font-size:22px;font-weight:800;margin-bottom:14px}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{font-size:17px;padding:14px 28px}
.woocommerce .cart-collaterals,.woocommerce-cart-form{margin-bottom:24px}

/* ---------- Checkout ---------- */
.woocommerce-checkout #customer_details{margin-bottom:24px}
.woocommerce-checkout h3{font-size:20px;font-weight:800;letter-spacing:-0.02em;margin-bottom:14px}
.woocommerce form .form-row label{font-weight:600;font-size:14px;color:#333;margin-bottom:6px}
.woocommerce-checkout #payment{background:#f6f8fa;border-radius:14px;border:1px solid var(--line)}
.woocommerce-checkout #payment ul.payment_methods{border-bottom:1px solid var(--line)}
.woocommerce #order_review .shop_table,.woocommerce-checkout .woocommerce-checkout-review-order-table{background:#fff}
#add_payment_method #payment div.payment_box,.woocommerce-cart #payment div.payment_box,.woocommerce-checkout #payment div.payment_box{background:#eef4f8;color:#234}

/* ---------- WP-menu compatibility (if a menu is assigned to "Главно меню") ---------- */
.nav__links li.menu-item-has-children{position:relative}
.nav__links .sub-menu{position:absolute;top:100%;left:0;min-width:215px;list-style:none;margin:0;padding:6px 0;
  background:rgba(16,18,22,.98);border-radius:0 0 14px 14px;box-shadow:0 18px 34px rgba(0,0,0,.32);
  opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s,transform .18s,visibility .18s;z-index:60}
.nav__links li.menu-item-has-children:hover .sub-menu,.nav__links li.menu-item-has-children:focus-within .sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
.nav__links .sub-menu a{display:block;padding:11px 22px;font-size:14px;font-weight:600;color:#fff;white-space:nowrap;border:none}
.nav__links .sub-menu a:hover{background:rgba(255,255,255,.08);color:var(--blue-bright)}

@media(max-width:980px){
  .woocommerce ul.products{grid-template-columns:repeat(2,1fr)}
  .woocommerce .related.products ul.products,.woocommerce .upsells.products ul.products{grid-template-columns:repeat(2,1fr)}
  .woocommerce div.product{grid-template-columns:1fr}
  .nav__links .sub-menu{position:static;opacity:1;visibility:visible;transform:none;box-shadow:none;background:rgba(0,0,0,.22);border-radius:0;padding:0}
}
@media(max-width:520px){
  .woocommerce ul.products{grid-template-columns:1fr;max-width:420px;margin-inline:auto}
}

/* ---------- Магазин: филтри (inc/shop.php) ---------- */
/* Подредбата се дефинира тук изцяло (не разчита на реда на елементите или на base.css). */
.wc-wrap .shop{display:grid;grid-template-columns:260px minmax(0,1fr);gap:clamp(24px,3vw,40px);align-items:start;margin-top:4px}
.wc-wrap .shop > .shop__filters{grid-column:1;grid-row:1}
.wc-wrap .shop > .shop__main{grid-column:2;grid-row:1;min-width:0}
.shop__main{min-width:0}
.shop__filters h3{margin-bottom:12px}
.shop__filters input[type=search],.shop__filters input[type=number]{
  width:100%;padding:9px 11px;border:1px solid #d8dee6;border-radius:8px;font-size:14px;font-family:inherit;background:#fff;color:#111}
.shop__filters input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(25,138,190,.14)}
.shop__check span{display:inline-flex;align-items:baseline;gap:5px}
.shop__check small{color:var(--gray);font-size:12px}
.shop__apply{width:100%;margin-top:4px;border:none;background:var(--blue);color:#fff;font-weight:700;font-size:14px;
  font-family:inherit;padding:11px 14px;border-radius:10px;cursor:pointer;transition:background .2s}
.shop__apply:hover{background:var(--blue-vivid)}
.shop__reset{display:inline-block;margin-top:12px;text-decoration:none}
.shop__filters-btn{display:none}
.shop__chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 18px}
.shop__chips-label{font-size:13px;color:var(--gray)}
.shop__chip{display:inline-flex;align-items:center;gap:7px;padding:5px 12px;border-radius:999px;font-size:13px;font-weight:600;
  background:#eef4f8;border:1px solid #d8e6ef;color:#14567a;text-decoration:none;transition:background .2s,color .2s,border-color .2s}
.shop__chip:hover{background:var(--blue);border-color:var(--blue);color:#fff}
.shop__chip--clear{background:none;border-style:dashed;color:var(--gray)}
.shop__empty{padding:22px 0;color:var(--gray)}
.shop__empty a{color:var(--blue);font-weight:600}
.woocommerce .shop__main ul.products{grid-template-columns:repeat(auto-fill,minmax(205px,1fr))}
.woocommerce .shop__main .woocommerce-ordering{margin-bottom:18px}

@media(max-width:820px){
  .wc-wrap .shop{grid-template-columns:minmax(0,1fr)}
  .wc-wrap .shop > .shop__filters{grid-column:1;grid-row:auto;position:static}
  .wc-wrap .shop > .shop__main{grid-column:1;grid-row:auto}
  .shop__filters-btn{display:block;width:100%;margin-bottom:14px;padding:12px 16px;border:1px solid var(--line);border-radius:12px;
    background:#fff;color:#111;font-family:inherit;font-size:15px;font-weight:700;cursor:pointer;text-align:left}
  .shop__filters-btn::after{content:'▾';float:right;color:var(--blue)}
  .shop__filters-btn[aria-expanded=true]::after{content:'▴'}
  .shop__filters{display:none;margin-bottom:20px}
  .shop__filters.is-open{display:block}
}
