/* ==========================================================================
   WooCommerce screens (shop, product, categories) — same design language as the inner pages.
   Uses the theme tokens only. Selectors are prefixed with body.woocommerce so they win over
   WooCommerce's own stylesheets without !important.
   ========================================================================== */

.wc-shell{--wc-font-body:'Figtree',system-ui,-apple-system,'Segoe UI',sans-serif;--wc-font-heading:'Fraunces',Georgia,'Times New Roman',serif}
.woocommerce-wrapper{background:var(--section-bg-alt,var(--color-bg-light))}
.wc-shell{padding-block:clamp(40px,6vw,88px) clamp(56px,8vw,112px)}
.wc-shell .woocommerce-notices-wrapper:empty{display:none}
.wc-shell .woocommerce-message,.wc-shell .woocommerce-info,.wc-shell .woocommerce-error{margin:0 0 1.5rem;padding:1rem 1.25rem;border:0;border-left:4px solid var(--color-accent);border-radius:var(--radius-md,12px);background:var(--color-bg-white);color:var(--color-text-dark);box-shadow:var(--shadow-sm)}
.wc-shell .woocommerce-message::before,.wc-shell .woocommerce-info::before{display:none}

/* ---- single product ---- */
body.woocommerce .wc-shell div.product{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(28px,5vw,72px);align-items:start}
body.woocommerce .wc-shell div.product div.images,
body.woocommerce .wc-shell div.product div.summary{float:none;width:100%;margin:0}
body.woocommerce .wc-shell div.product div.images{position:relative}
body.woocommerce .wc-shell div.product div.images img{display:block;width:100%;height:auto;border-radius:calc(var(--media-radius,20px) - 4px)}
body.woocommerce .wc-shell div.product .woocommerce-product-gallery__wrapper{border:3px solid var(--color-accent);border-radius:var(--media-radius,20px);background:var(--color-bg-white);box-shadow:var(--shadow-lg);overflow:hidden}
body.woocommerce .wc-shell div.product .woocommerce-product-gallery__trigger{top:14px;right:14px}

body.woocommerce .wc-shell div.product div.summary .price{margin:0 0 1.25rem;font-family:var(--wc-font-heading);font-size:var(--text-h3);font-weight:600;color:var(--color-primary)}
body.woocommerce .wc-shell div.product div.summary .woocommerce-product-details__short-description{font-size:var(--text-body-lg);line-height:1.6;color:var(--color-text-medium);max-width:56ch}
body.woocommerce .wc-shell div.product div.summary .woocommerce-product-details__short-description p{margin:0 0 1rem}
body.woocommerce .wc-shell div.product form.cart{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:1.5rem 0}
body.woocommerce .wc-shell div.product .quantity .qty{min-height:48px;width:5rem;padding:.5rem .75rem;border:2px solid var(--color-border);border-radius:var(--radius-md,12px);background:var(--color-bg-white);font:inherit;color:var(--color-text-dark)}
body.woocommerce .wc-shell div.product .product_meta{display:grid;gap:.35rem;margin-top:1.75rem;padding-top:1.25rem;border-top:1px solid var(--color-border);font-size:var(--text-small);color:var(--color-text-light)}
body.woocommerce .wc-shell div.product .product_meta a{color:var(--color-primary);text-underline-offset:.25em}

/* buttons */
body.woocommerce .wc-shell a.button,
body.woocommerce .wc-shell button.button,
body.woocommerce .wc-shell input.button,
body.woocommerce .wc-shell #respond input#submit{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:48px;padding:var(--button-padding-y,.8rem) var(--button-padding-x,1.5rem);border:2px solid transparent;border-radius:var(--button-radius,12px);background:var(--color-accent);color:var(--color-text-dark);font-family:var(--wc-font-body);font-size:1rem;font-weight:600;line-height:1.2;text-decoration:none;box-shadow:inset 0 0 0 1px rgba(36,20,51,.22);transition:transform var(--transition-fast),background var(--transition-fast)}
body.woocommerce .wc-shell a.button:hover,
body.woocommerce .wc-shell button.button:hover,
body.woocommerce .wc-shell input.button:hover,
body.woocommerce .wc-shell #respond input#submit:hover{background:#F2C86A;color:var(--color-text-dark);transform:translateY(-2px)}

/* honest ordering note (shown only while a product has no price) */
.wc-note{margin-top:1.75rem;padding:1.25rem 1.5rem;border-left:4px solid var(--color-accent);border-radius:var(--radius-md,12px);background:var(--color-bg-white);box-shadow:var(--shadow-sm)}
.wc-note h2{font-size:var(--text-h4);margin:0 0 .5rem}
.wc-note p{margin:0;color:var(--color-text-medium);font-size:var(--text-body)}
.wc-note__actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:1.1rem}

/* ---- tabs ---- */
body.woocommerce .wc-shell div.product .woocommerce-tabs{grid-column:1 / -1;margin-top:clamp(8px,2vw,24px)}
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs{display:flex;flex-wrap:wrap;gap:.25rem 2rem;margin:0 0 1.75rem;padding:0;overflow:visible;border-bottom:1px solid var(--color-border)}
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs::before,
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs li::before,
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs li::after{content:none;display:none;border:0;box-shadow:none}
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs li{margin:0;padding:0;border:0;border-radius:0;background:none}
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs li a{display:inline-flex;align-items:center;min-height:48px;padding:.5rem 0;border-bottom:3px solid transparent;margin-bottom:-1px;font-size:var(--text-label);font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--color-text-light);text-decoration:none}
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs li.active a,
body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs li a:hover{color:var(--color-primary);border-bottom-color:var(--color-accent)}
body.woocommerce .wc-shell div.product .woocommerce-tabs .panel{margin:0;padding:0;max-width:72ch}
body.woocommerce .wc-shell div.product .woocommerce-tabs .panel h2{font-size:var(--text-h3);margin:0 0 1rem}
body.woocommerce .wc-shell div.product .woocommerce-tabs .panel p{color:var(--color-text-medium);line-height:1.7}

/* ---- reviews form ---- */
.wc-shell #reviews #comments h2,.wc-shell #review_form .comment-reply-title{font-family:var(--wc-font-heading);font-size:var(--text-h4);font-weight:600;color:var(--color-text-dark)}
.wc-shell #review_form input[type="text"],
.wc-shell #review_form input[type="email"],
.wc-shell #review_form textarea{width:100%;min-height:48px;padding:.7rem .9rem;border:2px solid var(--color-border);border-radius:var(--radius-md,12px);background:var(--color-bg-white);font:inherit;color:var(--color-text-dark)}
.wc-shell #review_form input:focus-visible,.wc-shell #review_form textarea:focus-visible{outline:3px solid var(--color-accent);outline-offset:2px}

/* ---- related products & shop grids ---- */
.wc-shell .related.products,.wc-shell .upsells.products{grid-column:1 / -1;margin-top:clamp(24px,4vw,56px)}
.wc-shell .related.products>h2,.wc-shell .upsells.products>h2{margin-bottom:1.5rem;font-size:var(--text-h3)}
body.woocommerce .wc-shell ul.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:var(--space-gap,24px);margin:0;padding:0;list-style:none}
body.woocommerce .wc-shell ul.products::before,body.woocommerce .wc-shell ul.products::after{display:none}
body.woocommerce .wc-shell ul.products li.product{float:none;width:auto;margin:0;padding:1rem;border:1px solid var(--color-border);border-radius:var(--radius-lg,16px);background:var(--color-bg-white);box-shadow:var(--shadow-sm)}
body.woocommerce .wc-shell ul.products li.product img{width:100%;height:auto;border-radius:var(--radius-md,12px)}
body.woocommerce .wc-shell ul.products li.product .woocommerce-loop-product__title{margin:.9rem 0 .35rem;font-family:var(--wc-font-heading);font-size:var(--text-h4);font-weight:600;color:var(--color-text-dark)}
body.woocommerce .wc-shell ul.products li.product .price{color:var(--color-primary);font-weight:600}
.wc-shell .woocommerce-breadcrumb{display:none}

/* ---- shop / category archive: featured book card ---- */
.wc-shell .woocommerce-result-count{margin:0 0 1.25rem;font-size:var(--text-small);color:var(--color-text-light)}
.wc-shell .woocommerce-ordering{margin:0 0 1.25rem}
.wc-shell .woocommerce-ordering select{min-height:44px;padding:.5rem 2.25rem .5rem .9rem;border:2px solid var(--color-border);border-radius:var(--radius-md,12px);background-color:var(--color-bg-white);font:inherit;font-size:var(--text-small);color:var(--color-text-dark)}
.wc-shell .woocommerce-ordering select:focus-visible{outline:3px solid var(--color-accent);outline-offset:2px}
body.woocommerce .wc-shell ul.products{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
body.woocommerce .wc-shell ul.products li.product{display:flex;flex-direction:column;padding:clamp(14px,1.6vw,20px);border:2px solid var(--color-border);box-shadow:var(--shadow-md);transition:transform var(--transition-base),box-shadow var(--transition-base),border-color var(--transition-base)}
body.woocommerce .wc-shell ul.products li.product:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:var(--color-accent)}
body.woocommerce .wc-shell ul.products li.product .woocommerce-LoopProduct-link{display:block;color:inherit;text-decoration:none}
body.woocommerce .wc-shell ul.products li.product .woocommerce-loop-product__title{font-size:var(--text-h3);line-height:1.15}
body.woocommerce .wc-shell ul.products li.product .price{display:block;margin:0 0 .75rem;font-family:var(--wc-font-heading);font-size:var(--text-h3);font-weight:600;color:var(--color-primary)}
.wc-loop-desc{margin:0 0 1rem;color:var(--color-text-medium);font-size:var(--text-body);line-height:1.6}
.wc-loop-desc p{margin:0}
body.woocommerce .wc-shell ul.products li.product .button{align-self:flex-start;margin-top:auto}
.wc-loop-details{display:flex;align-items:center;min-height:48px;margin:.5rem 0 0;font-weight:600;color:var(--color-primary);text-underline-offset:.25em}
body.woocommerce .wc-shell ul.products li.product .added_to_cart{display:inline-flex;align-items:center;min-height:48px;margin-left:.75rem;font-weight:600;color:var(--color-primary)}

/* a single book gets a wide, two-column feature card instead of a lone tile in a grid */
@media (min-width:760px){
  body.woocommerce .wc-shell ul.products:has(> li.product:only-child){grid-template-columns:minmax(0,1fr);max-width:980px;margin-inline:auto}
  body.woocommerce .wc-shell ul.products li.product:only-child{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);column-gap:clamp(24px,4vw,56px);align-content:center;padding:clamp(20px,3vw,36px);border:3px solid var(--color-accent);border-radius:var(--media-radius,20px);box-shadow:var(--shadow-lg)}
  body.woocommerce .wc-shell ul.products li.product:only-child:hover{transform:none}
  body.woocommerce .wc-shell ul.products li.product:only-child .woocommerce-LoopProduct-link{display:contents}
  body.woocommerce .wc-shell ul.products li.product:only-child img{grid-column:1;grid-row:1 / span 6;align-self:center;border-radius:calc(var(--media-radius,20px) - 6px);box-shadow:var(--shadow-md)}
  body.woocommerce .wc-shell ul.products li.product:only-child > :not(.woocommerce-LoopProduct-link){grid-column:2;justify-self:start}
  body.woocommerce .wc-shell ul.products li.product:only-child .woocommerce-loop-product__title,
  body.woocommerce .wc-shell ul.products li.product:only-child .price,
  body.woocommerce .wc-shell ul.products li.product:only-child .wc-loop-desc{grid-column:2}
  body.woocommerce .wc-shell ul.products li.product:only-child .woocommerce-loop-product__title{align-self:end;margin-top:0;font-size:clamp(1.75rem,3vw,2.5rem)}
  body.woocommerce .wc-shell ul.products li.product:only-child .price{font-size:clamp(1.5rem,2.4vw,2rem)}
  body.woocommerce .wc-shell ul.products li.product:only-child .wc-loop-desc{max-width:52ch;font-size:var(--text-body-lg)}
  body.woocommerce .wc-shell ul.products li.product:only-child .button{grid-row:5;margin-top:.5rem;align-self:start}
  body.woocommerce .wc-shell ul.products li.product:only-child .wc-loop-details{grid-row:6;grid-column:2;justify-self:start;margin:.25rem 0 0}
}

/* ---- Cart & Checkout (WooCommerce blocks, with the classic shortcode screens as fallback) ---- */
.wc-shell .wp-block-woocommerce-cart,.wc-shell .wp-block-woocommerce-checkout,.wc-shell .woocommerce{font-family:var(--wc-font-body);color:var(--color-text-dark)}
.wc-shell .wc-block-cart__totals-title,.wc-shell .wc-block-components-title,.wc-shell .wc-block-components-checkout-step__title,.wc-shell .wp-block-woocommerce-cart h2,.wc-shell .cart_totals h2{font-family:var(--wc-font-heading);font-weight:600;letter-spacing:-.01em;color:var(--color-text-dark)}
.wc-shell .wc-block-components-sidebar,.wc-shell .wc-block-components-main{box-sizing:border-box}
.wc-shell .wc-block-cart__sidebar,.wc-shell .wc-block-checkout__sidebar,.wc-shell .cart_totals,.wc-shell .woocommerce-checkout-review-order{padding:clamp(18px,2.4vw,28px);border:1px solid var(--color-border);border-radius:var(--radius-lg,16px);background:var(--color-bg-white);box-shadow:var(--shadow-sm)}
.wc-shell .wc-block-cart-items th,.wc-shell .wc-block-cart-items__header,.wc-shell table.shop_table th{font-size:var(--text-label);font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--color-text-light)}
.wc-shell .wc-block-components-product-name,.wc-shell table.shop_table td.product-name a{font-family:var(--wc-font-heading);font-weight:600;color:var(--color-text-dark);text-decoration:none}
.wc-shell .wc-block-components-product-name:hover,.wc-shell table.shop_table td.product-name a:hover{color:var(--color-primary)}
.wc-shell .wc-block-cart-item__image img,.wc-shell table.shop_table td.product-thumbnail img{border-radius:var(--radius-md,12px);border:2px solid var(--color-accent)}
.wc-shell .wc-block-components-button:not(.is-link),.wc-shell .woocommerce a.checkout-button,.wc-shell .woocommerce #place_order{display:inline-flex;align-items:center;justify-content:center;min-height:48px;border:2px solid transparent;border-radius:var(--button-radius,12px);background:var(--color-accent);color:var(--color-text-dark);font-family:var(--wc-font-body);font-weight:600;box-shadow:inset 0 0 0 1px rgba(36,20,51,.22);transition:transform var(--transition-fast),background var(--transition-fast)}
.wc-shell .wc-block-components-button:not(.is-link):hover,.wc-shell .woocommerce a.checkout-button:hover,.wc-shell .woocommerce #place_order:hover{background:#F2C86A;color:var(--color-text-dark);transform:translateY(-2px)}
.wc-shell .wc-block-components-button.is-link,.wc-shell .wc-block-cart-item__remove-link{color:var(--color-primary);text-underline-offset:.25em}
.wc-shell .wc-block-components-text-input input,.wc-shell .wc-block-components-textarea,.wc-shell .wc-blocks-components-select__select,.wc-shell .wc-block-components-combobox .components-combobox-control__input,.wc-shell .woocommerce form .form-row input.input-text,.wc-shell .woocommerce form .form-row textarea,.wc-shell .woocommerce form .form-row select{border:2px solid var(--color-border);border-radius:var(--radius-md,12px);background:var(--color-bg-white);font-family:inherit;color:var(--color-text-dark)}
.wc-shell .wc-block-components-text-input input:focus,.wc-shell .wc-blocks-components-select__select:focus{outline:3px solid var(--color-accent);outline-offset:2px;box-shadow:none}
.wc-shell .wc-block-components-notice-banner,.wc-shell .woocommerce-info,.wc-shell .woocommerce-error{border-radius:var(--radius-md,12px);border-left-width:4px;background:var(--color-bg-white)}
.wc-shell .wc-block-components-totals-item__value,.wc-shell .wc-block-formatted-money-amount{color:var(--color-primary);font-weight:600}
.wc-shell .wp-block-woocommerce-empty-cart-block,.wc-shell .cart-empty{padding:clamp(24px,4vw,48px);border:1px solid var(--color-border);border-radius:var(--radius-lg,16px);background:var(--color-bg-white);text-align:center}
.wc-shell .return-to-shop .button{margin-top:1rem}

/* WordPress / WooCommerce block buttons and product tiles (empty-cart "Return to shop", "New in store", related blocks) */
.wc-shell{font-family:var(--wc-font-body);color:var(--color-text-dark)}
.wc-shell .wp-block-button__link,.wc-shell .wp-element-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:var(--button-padding-y,.8rem) var(--button-padding-x,1.5rem);border:2px solid transparent;border-radius:var(--button-radius,12px);background:var(--color-accent);color:var(--color-text-dark);font-family:var(--wc-font-body);font-size:1rem;font-weight:600;text-decoration:none;box-shadow:inset 0 0 0 1px rgba(36,20,51,.22);transition:transform var(--transition-fast),background var(--transition-fast)}
.wc-shell .wp-block-button__link:hover,.wc-shell .wp-element-button:hover{background:#F2C86A;color:var(--color-text-dark);transform:translateY(-2px)}
.wc-shell .wp-block-woocommerce-empty-cart-block h2{margin:0 0 1.25rem;font-size:var(--text-h3)}
.wc-shell .wc-block-grid__products{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:var(--space-gap,24px);margin:1.5rem 0 0;padding:0;list-style:none}
.wc-shell .wc-block-grid__product{margin:0;padding:1rem;border:1px solid var(--color-border);border-radius:var(--radius-lg,16px);background:var(--color-bg-white);text-align:left}
.wc-shell .wc-block-grid__product-image img{width:100%;height:auto;border-radius:var(--radius-md,12px)}
.wc-shell .wc-block-grid__product-title{margin:.9rem 0 .5rem;font-family:var(--wc-font-heading);font-size:var(--text-h4);font-weight:600;line-height:1.2;color:var(--color-text-dark);text-decoration:none}
.wc-shell .wc-block-grid__product-price{color:var(--color-primary);font-weight:600}
.wc-shell .wp-block-heading{font-family:var(--wc-font-heading);font-weight:600;color:var(--color-text-dark)}

.wc-shell .wc-block-grid .wc-block-grid__products .wc-block-grid__product{max-width:none;width:auto;flex:none}
.wc-shell .wc-block-grid__product-title,.wc-shell .wc-block-grid__product .wp-block-button__link{max-width:100%;overflow-wrap:anywhere}
@media (max-width:900px){
  body.woocommerce .wc-shell div.product{grid-template-columns:1fr}
  body.woocommerce .wc-shell div.product div.images{max-width:520px;margin-inline:auto}
}
@media (max-width:480px){
  body.woocommerce .wc-shell div.product .woocommerce-tabs ul.tabs{gap:.25rem 1.25rem}
  .wc-note__actions .btn{flex:1 1 100%}
}
