/* ==========================================================================
   STACKO — shop
   Product cards, WooCommerce notices, mini-cart drawer, and the cart /
   checkout / account blocks restyled into the comic system (ink background,
   paper type, pop-yellow actions, hard shadows).
   Depends on stacko.css + page.css.
   ========================================================================== */

/* --- 1. Product grid ----------------------------------------------------- */
.shop{background:var(--ink);}
.woocommerce ul.products,
ul.products{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:clamp(16px,2.4vw,28px);margin:0;padding:0;list-style:none;
}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none;}
.woocommerce ul.products li.product,
ul.products li.product{
  float:none;width:auto;margin:0;padding:18px 18px 20px;
  display:flex;flex-direction:column;gap:14px;
  background:var(--flavor-dark);border:3px solid var(--paper);
  box-shadow:var(--hard);
  transition:transform .18s cubic-bezier(.2,.7,.3,1),box-shadow .18s ease,background .25s ease;
}
/* WooCommerce's float layout (width:22.05% / 30.75% / 48%, margins) fights the grid. */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product{width:auto!important;margin:0!important;float:none!important;clear:none!important;}
ul.products li.product:hover{transform:translate(-3px,-3px);box-shadow:9px 9px 0 var(--pop);background:var(--flavor);}
.stacko-card__link{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;flex:1;}
.woocommerce ul.products li.product a img.stacko-card__img,
.stacko-card__img{
  height:clamp(180px,26vh,260px);width:auto;margin:0;
  filter:drop-shadow(0 16px 18px rgba(0,0,0,.55));
  transition:transform .3s cubic-bezier(.2,.7,.3,1);
}
ul.products li.product:hover .stacko-card__img{transform:translateY(-8px) rotate(-3deg);}
.stacko-card__meta{display:flex;flex-direction:column;align-items:center;gap:7px;}
.stacko-card__num{font-family:var(--heading);font-size:13px;letter-spacing:.2em;opacity:.7;}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.stacko-card__name{
  font-family:var(--font-display);text-transform:uppercase;font-size:clamp(16px,1.7vw,20px);
  line-height:1;padding:0;margin:0;color:var(--paper);
}
.stacko-card__tag{font-size:12px;opacity:.85;}
.stacko-card__price{font-family:var(--heading);font-size:22px;color:var(--pop);}
.stacko-card__price del{opacity:.5;font-size:.7em;margin-right:6px;}
.stacko-card__price ins{text-decoration:none;}
.stacko-card__btn{align-self:stretch;text-align:center;}
.woocommerce-result-count,.woocommerce-ordering{display:none;}
.woocommerce nav.woocommerce-pagination{margin-top:36px;}

/* --- 2. Notices ---------------------------------------------------------- */
.woocommerce-message,.woocommerce-info,.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.wc-block-components-notice-banner{
  background:var(--pop);color:var(--ink);border:3px solid var(--ink);border-radius:0;
  box-shadow:var(--hard-sm);padding:14px 16px;margin:0 0 18px;
  font-size:13px;font-weight:700;line-height:1.6;list-style:none;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;
}
.woocommerce-message::before,.woocommerce-info::before,.woocommerce-error::before{display:none;}
.woocommerce-error{background:#FF5A5A;}
.woocommerce-message a.button,.woocommerce-info a.button,.woocommerce-message .button,
.wc-block-components-notice-banner a{
  order:2;float:none;font-family:var(--font-display);text-transform:uppercase;font-size:12px;
  background:var(--ink);color:var(--paper);border:0;border-radius:0;padding:9px 13px;
  text-decoration:none;
}
.wc-block-components-notice-banner > svg{background:var(--ink);fill:var(--pop);border-radius:50%;}
.buy__notices:empty{display:none;}
.buy__notices{margin-top:14px;}
.buy__notice-actions{display:flex;gap:8px;flex-wrap:wrap;}
.buy__notices .woocommerce-message{animation:noticeIn .28s cubic-bezier(.2,.7,.3,1);}
@keyframes noticeIn{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion:reduce){.buy__notices .woocommerce-message{animation:none;}}
.buy__form[aria-busy="true"] #addToCart{cursor:progress;opacity:.85;}

/* --- 3. Generic WooCommerce buttons → comic buttons ---------------------- */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
.woocommerce #respond input#submit,.woocommerce a.button.alt,.woocommerce button.button.alt,
.wc-block-components-button:not(.is-link),
.wp-element-button.wc-block-components-button{
  font-family:var(--font-display);text-transform:uppercase;letter-spacing:.02em;
  font-size:clamp(12px,1.2vw,14px);font-weight:400;
  background:var(--pop);color:var(--ink);border:3px solid var(--ink);border-radius:0;
  box-shadow:var(--hard-sm);padding:13px 20px;line-height:1.1;
  transition:transform .12s ease,box-shadow .12s ease;
}
.woocommerce a.button:hover,.woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover{
  background:var(--pop);color:var(--ink);transform:translate(-1px,-1px);box-shadow:6px 6px 0 rgba(0,0,0,.35);
}
.wc-block-components-button:not(.is-link) .wc-block-components-button__text{color:inherit;}

/* --- 4. Mini-cart drawer: styles live in style.css (the drawer is site-wide). --- */

/* --- 5. Cart / checkout / account blocks on ink -------------------------- */
.wc-page{color:var(--paper);}
.wc-page a:not(.wc-block-components-button):not(.button){color:var(--pop);}
.wc-page h2,.wc-page h3,
.wc-block-components-title.wc-block-components-title,
.wc-block-cart__totals-title,
.wc-block-components-checkout-step__title{
  font-family:var(--font-display);text-transform:uppercase;color:var(--pop);
  font-size:clamp(15px,1.8vw,19px);letter-spacing:.02em;
}
.wc-block-cart-items,.wc-block-cart-items th,.wc-block-cart-items td,
.wc-block-components-totals-wrapper,.wc-block-components-panel,
.wc-block-cart .wc-block-cart__totals-title,
.wc-block-components-sidebar-layout .wc-block-components-main{border-color:rgba(255,255,255,.25)!important;}
.wc-block-components-product-name{font-family:var(--font-display);text-transform:uppercase;color:var(--paper)!important;}
.wc-block-components-product-metadata,.wc-block-components-product-details{color:rgba(255,255,255,.75);}
.wc-block-components-product-price,.wc-block-components-totals-item__value,
.wc-block-formatted-money-amount{font-family:var(--heading);letter-spacing:.02em;}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-formatted-money-amount{color:var(--pop);font-size:24px;}
/* Cart + checkout thumbnails: the whole tall can (theme art), never a square crop. */
.wc-block-cart-item__image img{
  filter:drop-shadow(0 8px 10px rgba(0,0,0,.5));
  width:auto!important;max-width:100%;height:96px!important;
  object-fit:contain;margin-inline:auto;display:block;
}
.wc-block-components-order-summary-item__image{display:flex;align-items:center;justify-content:center;}
.wc-block-components-order-summary-item__image img{
  width:auto!important;max-width:100%;height:64px!important;
  object-fit:contain;margin-inline:auto;filter:drop-shadow(0 6px 8px rgba(0,0,0,.45));
}

/* Inputs */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-combobox .components-combobox-control__input,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-quantity-selector,
.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,
.woocommerce form .form-row select{
  background:transparent!important;color:var(--paper)!important;
  border:3px solid var(--paper)!important;border-radius:0!important;
}
.wc-block-components-text-input label,
.wc-block-components-combobox label,
.wc-blocks-components-select__label{color:rgba(255,255,255,.7)!important;}
.wc-block-components-text-input.is-active label{color:var(--pop)!important;}
.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus,
.woocommerce form .form-row input.input-text:focus{border-color:var(--pop)!important;box-shadow:none!important;outline:none;}
.wc-blocks-components-select__select option{background:var(--ink);color:var(--paper);}
.wc-blocks-components-select__container{background:transparent!important;}
.wc-blocks-components-select__expand{fill:var(--paper)!important;}
.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector button{color:var(--paper)!important;}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox],
.wc-block-components-radio-control__input{
  background:transparent!important;border:2px solid var(--paper)!important;border-radius:0;
}
.wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:var(--pop);}
.wc-block-components-radio-control__input:checked::before{background:var(--pop)!important;}
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option{border-color:rgba(255,255,255,.35)!important;}
.wc-block-checkout__terms,.wc-block-components-checkout-return-to-cart-button{color:var(--paper);}
.wc-block-components-checkout-place-order-button{width:100%;font-size:16px!important;padding:18px!important;}

/* Empty cart */
.wp-block-woocommerce-empty-cart-block{text-align:center;}
.wc-block-cart__empty-cart__title{font-family:var(--font-display);text-transform:uppercase;font-size:clamp(20px,3vw,32px);}
.wc-block-cart__empty-cart__title::before{filter:invert(1);}

/* My account */
.woocommerce-account .woocommerce-MyAccount-navigation ul{list-style:none;display:grid;gap:8px;padding:0;}
.woocommerce-account .woocommerce-MyAccount-navigation a{
  display:block;border:3px solid var(--paper);padding:10px 14px;
  font-family:var(--font-display);text-transform:uppercase;font-size:13px;color:var(--paper)!important;
}
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation a:hover{background:var(--pop);color:var(--ink)!important;}
.woocommerce form.login,.woocommerce form.register{border:3px solid var(--paper);border-radius:0;padding:24px;}
.woocommerce table.shop_table{border:3px solid var(--paper);border-radius:0;color:var(--paper);}
.woocommerce table.shop_table th,.woocommerce table.shop_table td{border-color:rgba(255,255,255,.25);}

/* --- 6. Product page extras ---------------------------------------------- */
.buy__form{display:contents;}
.buy__pack[disabled]{opacity:.45;cursor:not-allowed;}
.buy__pack .p .woocommerce-Price-amount{font:inherit;}
.buy__pack .p del{font-size:.7em;opacity:.6;margin-right:6px;}
.buy__pack .p ins{text-decoration:none;}
#addToCart[disabled]{opacity:.5;cursor:not-allowed;}
.details__desc{margin:0 auto 28px;max-width:72ch;}
.details__desc p{font-size:14px;line-height:1.8;}

@media (max-width:640px){
  .woocommerce ul.products,ul.products{grid-template-columns:repeat(2,1fr);gap:12px;}
  ul.products li.product{padding:12px;}
  .woocommerce ul.products li.product a img.stacko-card__img,.stacko-card__img{height:150px;}
  .stacko-card__btn{font-size:11px;padding:11px 8px;}
}
