/*
Theme Name: bb-storefront-child
Template: storefront
Text Domain: bb-storefront-child
Description: Storefront child — WooCommerce products layout (grid, equal cards, 2-line titles, mobile 1-col). No custom hero/header.
Version: 1.1.0
*/

:root{
  --bb-green:#A2CB70;
  --bb-red:#FF6163;
  --bb-dark:#27532B;
  --bb-yellow:#FAA613;
  --bb-black:#000;
  --bb-white:#fff;
  --bb-gray:#787878;
  --bb-card-maxw:387px;
  --bb-card-h-desktop:671px;
}

/* Base */
.site-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px; /* Desktop */
}

/* Mobile optimization */
@media (max-width: 767px) {
  .site-main {
    padding: 0 16px;
  }
}

/* Small mobile (iPhone SE, etc) */
@media (max-width: 375px) {
  .site-main {
    padding: 0 12px;
  }
}

/* SHOP GRID */
.woocommerce ul.products,
.woocommerce-page ul.products{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(300px, 1fr)) !important;
  gap:40px !important;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{ display:none !important; }

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product{
  float:none !important;
  clear:none !important;
  width:auto !important;
  margin:0 !important;
}

/* Card */
.woocommerce ul.products li.product .bb-card{
  background:var(--bb-green);
  border-radius:20px;
  padding:32px 20px;
  text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:26px;justify-content:flex-start;
  max-width:var(--bb-card-maxw);
  height:var(--bb-card-h-desktop);
  margin-inline:auto;
}
/* Color rotation */
.woocommerce ul.products li.product:nth-child(4n+1) .bb-card{background:var(--bb-green)}
.woocommerce ul.products li.product:nth-child(4n+2) .bb-card{background:var(--bb-red)}
.woocommerce ul.products li.product:nth-child(4n+3) .bb-card{background:var(--bb-yellow)}
.woocommerce ul.products li.product:nth-child(4n+4) .bb-card{background:var(--bb-dark)}

/* Thumbnail */
.bb-card__thumb{ display:block; }
.bb-card__thumb img{
  width:242px; height:372px; object-fit:cover;
  border-radius:20px; box-shadow:0 18px 16px rgba(0,0,0,.25);
}

/* Title — clamp to 2 lines, equal height */
.bb-card__title{
  color:#fff; font-size:30px; line-height:1.2; font-weight:700; margin:0; text-align:center;
  display:-webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp:2; overflow:hidden;
  min-height:2.4em; /* 2 lines * 1.2 */
}

/* Price */
.bb-card__price{ color:#fff; font-size:20px; line-height:30px; min-height:30px; }
.bb-card__price .bb-eur{ opacity:.95; }

/* CTA - САМО ТУК Е ПРОМЯНАТА */
.bb-card__cta{ margin-top:auto; width:100%; display:flex; justify-content:center; }
.bb-card__cta .button{
  display:flex;align-items:center;justify-content:center;
  width:100%;max-width:286px;
  padding: 16px 20px; /* ⬅️ ПРОМЯНА: повече padding отгоре и отдолу */
  min-height:62px; /* ⬅️ ПРОМЯНА: осигурява минимална височина */
  border-radius:20px;
  background:#fff;color:#000;font-size:26px;line-height:1.3;font-weight:600;text-decoration:none;
}
.bb-card__cta .added_to_cart{display:none}

/* Hide Woo's default title/price (we render our own) */
.woocommerce ul.products li.product .woocommerce-loop-product__title{display:none}
.woocommerce ul.products li.product .price{display:none}

/* Toolbar layout (optional tidy) */
.bb-shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0 30px}
.bb-toolbar-left{display:flex;align-items:center;gap:16px}
.bb-toolbar-right{display:flex;align-items:center;gap:12px}
.woocommerce .woocommerce-result-count{font-size:20px;line-height:30px}
.woocommerce .woocommerce-ordering .orderby{
  appearance:none;-webkit-appearance:none;
  height:46px;padding:0 14px;border-radius:10px;border:1px solid #000;background:#fff;
  font-size:20px;line-height:30px
}

/* Responsive */
@media (max-width:1200px){
  .woocommerce ul.products{ grid-template-columns:repeat(2, minmax(300px, 1fr)) !important; }
}
@media (max-width:768px){
  .woocommerce ul.products{ grid-template-columns:1fr !important; }
  .woocommerce ul.products li.product .bb-card{
    height:auto; max-width:100%;
  }
  .bb-card__thumb img{
    width:min(300px, 90vw);
    height:auto;
    aspect-ratio:242/372;
  }
}


/* === BEGIN PATCH 4 === */
/* === PATCH 4: Spacing below grid and under CTA === */
.woocommerce ul.products{ margin-bottom:48px !important; }
.woocommerce ul.products li.product .bb-card{ padding-bottom:40px; }
.bb-card__cta .button{ margin-bottom:8px; }

@media (max-width:768px){
  .woocommerce ul.products{ margin-bottom:64px !important; }
}
/* === END PATCH 4 === */


/* === BEGIN PATCH 5 === */
/* === PATCH 5: Extra breathing room below CTA on desktop === */
:root{ --bb-card-h-desktop: 720px; } /* was 671px */
.woocommerce ul.products li.product .bb-card{
  box-sizing: border-box;
  padding-bottom: 64px;
}
.bb-card__cta .button{ margin-bottom: 12px; }
/* === END PATCH 5 === */

.date-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 6px;
}

@media (min-width: 768px) {
    .date-icon {
        width: 32px;
        height: 32px;
        margin-top: 7px;
    }
}

@media (min-width: 1024px) {
    .date-icon {
        width: 36px;
        height: 36px;
        margin-top: 8px;
    }
}

.single-product .related {
  display: none !important;
}

/* Разширява основния контейнер на продуктова страница */
.single-product .site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* По желание - премахни страничния sidebar, ако пречи */
.single-product #secondary {
  display: none;
}

/* Накарай съдържанието да заеме цялата ширина */
.single-product #primary {
  width: 100%;
}

/* Mobile burger button - fixed top-right */
@media (max-width: 1023px) {
  .bb-menu-toggle {
    position: fixed !important; /* fixed вместо absolute */
    top: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    margin: 0 !important;
  }
}

/* ===== GALLERY - 2 COLUMNS LAYOUT ===== */
.bb-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 колони */
  gap: 70px;
  max-width: 1240px;
  margin: 0 auto;
}

/* Mobile - 1 column */
@media (max-width: 768px) {
  .bb-gallery {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Date icons - подравнени */
.date-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 6px;
}

@media (min-width: 768px) {
    .date-icon {
        width: 32px;
        height: 32px;
        margin-top: 7px;
    }
}

@media (min-width: 1024px) {
    .date-icon {
        width: 36px;
        height: 36px;
        margin-top: 8px;
    }
}

/* YouTube video wrapper - responsive */
.bb-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 40px;
}

.bb-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

/* === Mini Cart Dropdown === */

/* Overlay */
.bb-mini-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bb-mini-cart-overlay.bb-overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Mini Cart Panel */
.bb-mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bb-mini-cart.bb-mini-cart-open {
  transform: translateX(0);
}

body.bb-cart-open {
  overflow: hidden;
}

/* Header */
.bb-mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 2px solid #f0f0f0;
  background: var(--bb-green);
}

.bb-mini-cart-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: "American Typewriter", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.bb-cart-icon {
  width: 28px;
  height: 28px;
  stroke: #fff;
}

.bb-cart-count {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.9;
}

.bb-mini-cart-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.bb-mini-cart-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bb-mini-cart-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

/* Body */
.bb-mini-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Empty State */
.bb-mini-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.bb-mini-cart-empty svg {
  width: 80px;
  height: 80px;
  stroke: #ddd;
  margin-bottom: 16px;
}

.bb-mini-cart-empty p {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  color: #999;
  margin: 0;
}

/* Cart Items */
.bb-mini-cart-items {
  display: none;
}

.bb-mini-cart-items .woocommerce-mini-cart {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bb-mini-cart-items .woocommerce-mini-cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.bb-mini-cart-items .woocommerce-mini-cart-item:last-child {
  border-bottom: none;
}

.bb-mini-cart-items a:not(.remove) {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.bb-mini-cart-items img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.bb-mini-cart-items .woocommerce-mini-cart-item-name {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-bottom: 8px;
  line-height: 1.3;
}

.bb-mini-cart-items .quantity {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.bb-mini-cart-items .amount {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--bb-red);
}

.bb-mini-cart-items .remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #999 !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.bb-mini-cart-items .remove:hover {
  background: var(--bb-red);
  color: #fff !important;
}

/* Footer */
.bb-mini-cart-footer {
  padding: 20px 24px;
  border-top: 2px solid #f0f0f0;
  background: #fafafa;
  display: none;
}

.bb-mini-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
}

.bb-total-label {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: #000;
}

.bb-total-price {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--bb-green);
}

.bb-mini-cart-actions {
  display: flex;
  gap: 12px;
}

.bb-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: "American Typewriter", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid;
}

.bb-btn-secondary {
  background: #fff;
  color: var(--bb-dark);
  border-color: var(--bb-dark);
}

.bb-btn-secondary:hover {
  background: var(--bb-dark);
  color: #fff;
}

.bb-btn-primary {
  background: var(--bb-green);
  color: #fff;
  border-color: var(--bb-green);
}

.bb-btn-primary:hover {
  background: var(--bb-dark);
  border-color: var(--bb-dark);
}

/* Mobile */
@media (max-width: 480px) {
  .bb-mini-cart {
    width: 100%;
    max-width: 100%;
  }
  
  .bb-mini-cart-actions {
    flex-direction: column;
  }
  
  .bb-mini-cart-items img {
    width: 60px;
    height: 60px;
  }
}

/* === Mini Cart Items Styling === */
.bb-cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.bb-cart-item:last-child {
  border-bottom: none;
}

.bb-cart-item-link {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.bb-cart-item-image {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.bb-cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.bb-cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bb-cart-item-name {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}

.bb-cart-item-qty {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 14px;
  color: #666;
}

.bb-cart-item-total {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--bb-red);
}

.bb-cart-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #999;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-start;
}

.bb-cart-item-remove:hover {
  background: var(--bb-red);
  color: #fff;
}

/* ========================================
   === MINI CART DROPDOWN SYSTEM ===
   ======================================== */

/* Overlay */
.bb-mini-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bb-mini-cart-overlay.bb-overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Mini Cart Panel */
.bb-mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bb-mini-cart.bb-mini-cart-open {
  transform: translateX(0);
}

/* Mobile viewport fix */
@supports (height: 100dvh) {
  .bb-mini-cart {
    height: 100dvh;
  }
}

@supports not (height: 100dvh) {
  .bb-mini-cart {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
  }
}

body.bb-cart-open {
  overflow: hidden;
}

/* Header */
.bb-mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 2px solid #f0f0f0;
  background: var(--bb-green);
  flex-shrink: 0;
}

.bb-mini-cart-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: "American Typewriter", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.bb-cart-icon {
  width: 28px;
  height: 28px;
  stroke: #fff;
  flex-shrink: 0;
}

.bb-cart-count {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.9;
}

.bb-mini-cart-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.bb-mini-cart-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bb-mini-cart-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

/* Body */
.bb-mini-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 0;
}

/* Empty State */
.bb-mini-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.bb-mini-cart-empty svg {
  width: 80px;
  height: 80px;
  stroke: #ddd;
  margin-bottom: 16px;
}

.bb-mini-cart-empty p {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  color: #999;
  margin: 0;
}

/* Cart Items */
.bb-mini-cart-items {
  display: none;
}

.bb-cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.bb-cart-item:last-child {
  border-bottom: none;
}

.bb-cart-item-link {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.bb-cart-item-image {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.bb-cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.bb-cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bb-cart-item-name {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}

.bb-cart-item-qty {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 14px;
  color: #666;
}

.bb-cart-item-total {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--bb-red);
}

.bb-cart-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #999;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-start;
}

.bb-cart-item-remove:hover {
  background: var(--bb-red);
  color: #fff;
}

/* Footer */
.bb-mini-cart-footer {
  padding: 20px 24px;
  border-top: 2px solid #f0f0f0;
  background: #fafafa;
  display: none;
  flex-shrink: 0;
}

.bb-mini-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
}

.bb-total-label {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: #000;
}

.bb-total-price {
  font-family: "American Typewriter", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--bb-green);
}

.bb-mini-cart-actions {
  display: flex;
  gap: 12px;
}

.bb-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: "American Typewriter", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid;
}

.bb-btn-secondary {
  background: #fff;
  color: var(--bb-dark);
  border-color: var(--bb-dark);
}

.bb-btn-secondary:hover {
  background: var(--bb-dark);
  color: #fff;
}

.bb-btn-primary {
  background: var(--bb-green);
  color: #fff;
  border-color: var(--bb-green);
}

.bb-btn-primary:hover {
  background: var(--bb-dark);
  border-color: var(--bb-dark);
}

/* === Cart Button (Desktop & Mobile) === */

/* Desktop Cart Button */
.bb-cart-button-desktop {
  position: fixed;
  top: 20px;
  right: 80px;
  width: 56px;
  height: 56px;
  background: var(--bb-green);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  transition: all 0.3s ease;
}

.bb-cart-button-desktop:hover {
  background: var(--bb-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.bb-cart-button-desktop .bb-cart-button-icon {
  width: 28px;
  height: 28px;
  stroke: #fff;
}

/* Mobile Cart Button */
.bb-cart-button-mobile {
  position: fixed;
  top: 86px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--bb-green);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  transition: all 0.3s ease;
}

.bb-cart-button-mobile:hover {
  background: var(--bb-dark);
  transform: scale(1.05);
}

.bb-cart-button-mobile .bb-cart-button-icon {
  width: 28px;
  height: 28px;
  stroke: #fff;
}

/* Badge */
.bb-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--bb-red);
  color: #fff;
  font-family: "American Typewriter", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  animation: bb-badge-bounce 0.5s ease;
}

@keyframes bb-badge-bounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

/* Mobile - показва mobile button, скрива desktop */
@media (max-width: 1023px) {
  .bb-cart-button-desktop {
    display: none !important;
  }
  
  .bb-cart-button-mobile {
    display: flex;
  }
  
  .bb-mini-cart {
    width: 100%;
    max-width: 100%;
  }
  
  .bb-mini-cart-actions {
    flex-direction: column;
  }
  
  .bb-cart-item-image {
    width: 60px;
    height: 60px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .bb-cart-button-desktop {
    display: flex;
  }
  
  .bb-cart-button-mobile {
    display: none !important;
  }
}

/* === Buy Link под снимка на About страница === */
.bb-buy-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding: 16px 40px;
  background: var(--bb-green);
  color: #fff;
  font-family: "American Typewriter", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border: 3px solid var(--bb-green);
}

.bb-buy-link:hover {
  background: var(--bb-dark);
  border-color: var(--bb-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile */
@media (max-width: 767px) {
  .bb-buy-link {
    margin-top: 16px;
    padding: 14px 32px;
    font-size: 18px;
  }
}

.hidden-original {
    display: none !important;
}

.billing-address-row td {
    padding: 20px 12px !important;
}

.billing-address-row .form-row {
    width: 100% !important;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .billing-address-row td {
        padding: 20px 0 !important;
    }
}

/* Скриване на "(по избор)" текста */
#billing_address_1_field .optional {
    display: none !important;
}

/* ========================================
   SALE BADGE - PREMIUM ДИЗАЙН 2025
   ======================================== */

/* Скрий стандартния WooCommerce badge */
.woocommerce span.onsale {
  display: none !important;
}

/* Product card позициониране */
.woocommerce ul.products li.product {
  position: relative !important;
  overflow: visible !important;
}

/* SALE BADGE - Модерен минималистичен дизайн */
.woocommerce ul.products li.product.sale::after {
  content: '%';
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  
  /* Визия - Bold minimalism trend 2025 */
  background: linear-gradient(135deg, #FF6163 0%, #FF4548 100%);
  color: #FFFFFF;
  
  /* Размери */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  
  /* Типография - Bold & clean */
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  
  /* Центриране */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Premium ефекти */
  box-shadow: 
    0 4px 12px rgba(255, 97, 99, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  
  /* Smooth transitions */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover ефект на продукта - micro-interaction */
.woocommerce ul.products li.product.sale:hover::after {
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 
    0 6px 20px rgba(255, 97, 99, 0.35),
    0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Subtle pulse animation за внимание */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.woocommerce ul.products li.product.sale::after {
  animation: badge-pulse 2.5s ease-in-out infinite;
}

/* Stop animation on hover */
.woocommerce ul.products li.product.sale:hover::after {
  animation: none;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .woocommerce ul.products li.product.sale::after {
    width: 65px;
    height: 65px;
    font-size: 34px;
    top: 18px;
    right: 18px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .woocommerce ul.products li.product.sale::after {
    width: 68px;
    height: 68px;
    font-size: 36px;
    top: 20px;
    right: 20px;
  }
}

/* Small mobile (375px и по-малко) */
@media (max-width: 375px) {
  .woocommerce ul.products li.product.sale::after {
    width: 52px;
    height: 52px;
    font-size: 26px;
    top: 12px;
    right: 12px;
  }
}

/* Extra small screens */
@media (max-width: 320px) {
  .woocommerce ul.products li.product.sale::after {
    width: 48px;
    height: 48px;
    font-size: 24px;
    top: 10px;
    right: 10px;
  }
}

/* Dark mode support (ако някога добавиш) */
@media (prefers-color-scheme: dark) {
  .woocommerce ul.products li.product.sale::after {
    box-shadow: 
      0 4px 12px rgba(255, 97, 99, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

/* Motion preferences - accessibility */
@media (prefers-reduced-motion: reduce) {
  .woocommerce ul.products li.product.sale::after {
    animation: none !important;
    transition: none !important;
  }
}
