/* SHOP WRAPPER */

.custom-shop{
background:#f3eeff;
padding-top:0;
width:100%;
}

.shop-seo-content{
max-width:1120px;
margin:18px auto 12px;
padding:16px 18px;
border-radius:14px;
background:#ffffff;
border:1px solid #e9ddff;
box-shadow:0 8px 24px rgba(124,58,237,.06);
color:#374151;
font-size:15px;
line-height:1.75;
}

.shop-seo-content > *:first-child{
margin-top:0;
}

.shop-seo-content > *:last-child{
margin-bottom:0;
}

.shop-seo-content a{
color:#6d28d9;
text-decoration:underline;
text-underline-offset:2px;
}

@media (max-width: 767px){
.shop-seo-content{
margin:14px 10px 8px;
padding:14px 12px;
font-size:14px;
line-height:1.7;
}
}


/* GRID */

.custom-products-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
gap:28px;
padding:0;
margin-top:40px;
max-width:1400px;
margin:40px auto 0;
}

/* PRODUCT CARD */

.custom-product{
background:#ffffff;
height:100%;
border-radius:18px;
overflow:hidden;
transition:transform .35s, box-shadow .35s;
box-shadow:0 10px 30px rgba(0,0,0,.05);
display:flex;
z-index:1;
flex-direction:column;
}

.custom-product:hover{
transform:translateY(-6px);
box-shadow:0 25px 60px rgba(0,0,0,0.15);
z-index:2;
}

.product-image{
display:block;
background:#ffffff;
padding:25px;
}

.image-wrapper{
position:relative;
aspect-ratio:1/1;
background:#ffffff;
}

.product-sale-badge{
position:absolute;
top:10px;
left:10px;
z-index:6;
display:inline-flex;
align-items:center;
justify-content:center;
min-height:28px;
padding:0 10px;
border-radius:999px;
background:linear-gradient(135deg,#ef4444,#dc2626);
color:#fff;
font-size:12px;
font-weight:800;
letter-spacing:.02em;
box-shadow:0 8px 18px rgba(220,38,38,.28);
}

.image-wrapper img{
width:100%;
height:100%;
object-fit:contain;
pointer-events:none;
position:absolute;
top:0;
left:0;
transition:opacity .35s, transform .35s;
}

.custom-product:hover .image-wrapper img{
transform:scale(1.08);
}

.primary-image{
opacity:1;
z-index:2;
}

.secondary-image{
opacity:0;
z-index:1;
}

.custom-product:hover .primary-image{
opacity:0;
}

.custom-product:hover .secondary-image{
opacity:1;
}

.custom-product:not(.has-secondary-image):hover .primary-image{
opacity:1;
}

.custom-product.bambu-color-preview-active:hover .primary-image{
opacity:1;
}

.custom-product.bambu-color-preview-active:hover .secondary-image{
opacity:0;
}

.product-info{
padding:20px;
display:flex;
flex-direction:column;
gap:10px;
flex-grow:1;
}

.product-price{
font-size:22px;
font-weight:700;

min-height:26px;
letter-spacing:-0.3px;

display:flex;
align-items:center;
}

.bambu-card-color-swatches{
display:flex;
flex-wrap:wrap;
gap:8px;
margin-top:6px;
max-width:100%;
}

.bambu-card-color-swatch{
width:24px;
height:24px;
min-width:24px;
min-height:24px;
border-radius:999px;
border:1px solid rgba(17,24,39,.12);
background:var(--bambu-card-swatch-color, #e5e7eb);
box-shadow:none;
cursor:pointer;
padding:0;
transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bambu-card-color-swatch:hover{
transform:translateY(-1px);
border-color:#a78bfa;
}

.bambu-card-color-swatch.is-active{
border-color:#7c3aed;
box-shadow:0 0 0 2px rgba(124,58,237,.22);
}

.bambu-card-color-swatch-more{
width:24px;
height:24px;
min-width:24px;
min-height:24px;
border-radius:999px;
border:1px solid #7c3aed;
background:#f3e8ff;
color:#5b21b6;
font-size:11px;
font-weight:700;
line-height:24px;
display:inline-flex;
align-items:center;
justify-content:center;
padding:0;
cursor:pointer;
box-shadow:0 0 0 1px rgba(124,58,237,.10) inset;
transition:transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
text-align:center;
letter-spacing:0;
font-variant-numeric:tabular-nums;
}

.bambu-card-color-swatch-more:hover{
transform:translateY(-1px);
background:#ede9fe;
border-color:#6d28d9;
box-shadow:0 0 0 2px rgba(124,58,237,.16);
}

/* Button +N exists only for mobile UX */
[data-bambu-swatch-more]{
display:none;
}

@media (max-width: 768px){
  [data-bambu-swatch-more]{
    display:inline-flex;
  }
  .custom-product .bambu-card-color-swatches{
    overflow:hidden;
    max-height:56px;
    transition:max-height .28s ease;
  }
  .custom-product.bambu-swatches-expanded .bambu-card-color-swatches{
    max-height:220px;
  }
  .custom-product:not(.bambu-swatches-expanded) .bambu-card-color-swatch.is-mobile-extra{
    display:none;
  }
  .custom-product.bambu-swatches-expanded [data-bambu-swatch-more]{
    display:none !important;
  }
}

.product-price del{
font-size:15px;
font-weight:600;
color:#9ca3af;
opacity:1;
margin-right:10px;
text-decoration:line-through;
text-decoration-thickness:2px;
text-decoration-color:#ef4444;
}

.product-price ins{
text-decoration:none;
color:#dc2626;
font-size:24px;
font-weight:800;
}

.custom-product.is-sale{
border:1px solid rgba(239,68,68,.22);
box-shadow:0 14px 32px rgba(239,68,68,.10), 0 10px 30px rgba(0,0,0,.05);
}

.custom-product.is-sale:hover{
box-shadow:0 24px 52px rgba(239,68,68,.18), 0 25px 60px rgba(0,0,0,.15);
}

.product-title{
font-size:18px;
font-weight:600;
line-height:1.4;
margin:0;

display:-webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;

overflow:hidden;

min-height:44px;
}

.product-title a{
color:#111;
text-decoration:none;
}

.product-button{
margin-top:auto;
display:flex;
flex-direction:column;
gap:8px;
justify-content:center;
align-items:center;
width:100%;
}

.product-button .button{
display:flex;
align-items:center;
justify-content:center;
width:100%;
height:44px;

background:linear-gradient(135deg,#7c3aed,#6d28d9);
color:#fff;

border-radius:10px;
font-weight:600;
font-size:14px;

transition:.25s;
}

.product-button .button:hover{
transform:translateY(-1px);
box-shadow:0 6px 20px rgba(124,58,237,0.3);
}

.product-button .product-buy-now-btn{
display:flex;
align-items:center;
justify-content:center;
width:100%;
height:42px;
background:#111827;
color:#fff;
border-radius:10px;
font-weight:700;
font-size:13px;
line-height:1.15;
text-decoration:none;
border:0;
cursor:pointer;
position:relative;
transition:.25s;
}

.product-button .product-buy-now-btn:hover{
transform:translateY(-1px);
box-shadow:0 6px 20px rgba(17,24,39,.28);
background:#1f2937;
}

.product-button .product-buy-now-btn:disabled{
opacity:.85;
cursor:not-allowed;
transform:none;
}

.product-button .product-buy-now-btn.is-loading{
color:transparent;
}

.product-button .product-buy-now-btn.is-loading::after{
content:"";
position:absolute;
top:50%;
left:50%;
width:16px;
height:16px;
margin:-8px 0 0 -8px;
border-radius:50%;
border:2px solid rgba(255,255,255,.45);
border-top-color:#fff;
animation:bambuCardBuyNowSpin .8s linear infinite;
}

@keyframes bambuCardBuyNowSpin{
to{ transform:rotate(360deg); }
}

.product-stock{
font-size:13px;
font-weight:500;

padding:6px 10px;
border-radius:8px;

margin-top:6px;

display:flex;
align-items:center;
justify-content:center;

text-align:center;
width:100%;
}

.product-stock.in-stock{
background:#e8f7ee;
color:#15803d;
}

.product-stock.low-stock{
background:linear-gradient(135deg,#fff1f2 0%,#ffe4e6 100%);
color:#be123c;
border:1px solid #fecdd3;
box-shadow:0 8px 20px rgba(244,63,94,.16);
font-weight:700;
}

.product-stock.backorder{
background:#fff7ed;
color:#c2410c;
}

.product-stock.out-of-stock{
background:#fee2e2;
color:#b91c1c;
}

.woocommerce ul.products{
display:grid!important;
grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
gap:40px;
padding:0;
margin-top:40px;
list-style:none;
}

/* скрываем стандартный вывод категорий Woo */

ul.products li.product-category{
display:none!important;
}







@media (max-width: 768px){

.custom-products-grid{
grid-template-columns:repeat(2,1fr);
gap:20px;
padding-left:20px;
padding-right:20px;
}

}


/* =================================================
   SHOP PAGINATION  (same visual system as account)
================================================= */

.shop-pagination.bambu-orders-pagination {
    margin: 40px 0 20px;
}

.bambu-orders-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.bambu-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.bambu-page-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.04);
    text-decoration: none;
}

.bambu-page-btn.active {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
    pointer-events: none;
}

/* ===============================
   BUTTON STATES
================================ */

.product-button .button {
    transition: all 0.25s ease;
}

/* ADDED STATE */
.product-button .button.is-added {
    background: #d1f5dc !important;
    color: #1a7f37 !important;
    border: none;
}

/* HOVER (когда уже added) */
.product-button .button.is-added:hover {
    background: #1a7f37 !important;
    color: #fff !important;
}

.added_to_cart.wc-forward {
    display: none !important;
}

/* SEARCH EMPTY STATE */
.bambu-search-empty{
display:grid;
grid-template-columns:minmax(260px,420px) minmax(0,1fr);
gap:clamp(18px,3vw,34px);
align-items:center;
margin:26px auto 18px;
padding:clamp(18px,3vw,34px);
border-radius:24px;
border:1px solid rgba(167,139,250,.32);
background:
radial-gradient(700px 420px at 112% -8%, rgba(124,58,237,.2), transparent 62%),
radial-gradient(620px 320px at -10% 108%, rgba(139,92,246,.16), transparent 58%),
linear-gradient(180deg,#1b1530,#120f24);
box-shadow:0 24px 54px rgba(91,33,182,.24);
color:#ede9fe;
}

.bambu-search-empty__media{
display:flex;
justify-content:center;
align-items:flex-start;
width:min(100%,420px);
height:420px;
overflow:hidden;
}

.bambu-search-empty__media img{
display:block;
width:152%;
max-width:none;
height:auto;
transform:translateX(0) translateY(0);
filter:drop-shadow(0 20px 28px rgba(76,29,149,.36));
animation:bambuSearchFloat 4.6s ease-in-out infinite;
}

.bambu-search-empty__content{
display:flex;
flex-direction:column;
align-items:flex-start;
}

.bambu-search-empty__title{
margin:0;
font-size:clamp(28px,4.4vw,46px);
line-height:1.08;
letter-spacing:-.02em;
color:#fff;
}

.bambu-search-empty__lead{
margin:10px 0 0;
font-size:19px;
line-height:1.35;
font-weight:600;
color:#e9ddff;
}

.bambu-search-empty__query{
margin:10px 0 0;
font-size:14px;
font-weight:600;
color:#c4b5fd;
}

.bambu-search-empty__text{
margin:12px 0 0;
max-width:620px;
font-size:16px;
line-height:1.62;
color:#ddd6fe;
}

.bambu-search-empty__actions{
margin-top:18px;
display:flex;
flex-wrap:wrap;
gap:10px;
}

.bambu-search-empty__btn{
display:inline-flex;
align-items:center;
justify-content:center;
min-height:44px;
padding:0 18px;
border-radius:12px;
font-size:14px;
font-weight:700;
letter-spacing:.01em;
text-decoration:none;
transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.bambu-search-empty__btn--primary{
background:linear-gradient(135deg,#8b5cf6,#6d28d9);
color:#fff;
box-shadow:0 12px 22px rgba(124,58,237,.4);
}

.bambu-search-empty__btn--primary:hover{
transform:translateY(-1px);
box-shadow:0 16px 26px rgba(124,58,237,.5);
}

.bambu-search-empty__btn--ghost{
background:rgba(255,255,255,.07);
color:#ede9fe;
border:1px solid rgba(196,181,253,.38);
}

.bambu-search-empty__btn--ghost:hover{
transform:translateY(-1px);
background:rgba(255,255,255,.12);
border-color:rgba(196,181,253,.58);
}

.bambu-search-empty__links{
margin:16px 0 0;
padding:0;
list-style:none;
display:flex;
flex-wrap:wrap;
gap:10px;
}

.bambu-search-empty__links a{
display:inline-flex;
align-items:center;
justify-content:center;
min-height:34px;
padding:0 12px;
border-radius:999px;
background:rgba(124,58,237,.16);
border:1px solid rgba(167,139,250,.34);
font-size:13px;
font-weight:600;
color:#ede9fe;
text-decoration:none;
transition:transform .16s ease, background .16s ease, border-color .16s ease;
}

.bambu-search-empty__links a:hover{
transform:translateY(-1px);
background:rgba(124,58,237,.28);
border-color:rgba(167,139,250,.58);
}

@keyframes bambuSearchFloat{
0%,100%{ transform:translateY(0); }
50%{ transform:translateY(-7px); }
}

@media (max-width:900px){
.bambu-search-empty{
grid-template-columns:1fr;
text-align:center;
}

.bambu-search-empty__content{
align-items:center;
}

.bambu-search-empty__actions{
justify-content:center;
}

.bambu-search-empty__media{
width:min(100%,330px);
height:350px;
}

.bambu-search-empty__media img{
width:145%;
transform:translateX(0) translateY(0);
}
}

@media (max-width:767px){
.bambu-search-empty{
padding:16px 12px;
border-radius:16px;
}

.bambu-search-empty__title{
font-size:clamp(24px,8vw,32px);
}

.bambu-search-empty__text{
font-size:15px;
}

.bambu-search-empty__btn{
width:100%;
}

.bambu-search-empty__actions{
width:100%;
flex-direction:column;
}
}