/*
Theme Name: Trang Vintage Boutique 2.4
Theme URI: https://trangvintage.vn/
Author: Trang Vintage
Description: Editorial WooCommerce theme for Trang Vintage — one-of-a-kind Japanese thrift, vintage accessories and collectibles. Includes normal cart/checkout and automatic “Đã bán” status when stock reaches zero.
Version: 2.4.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: trang-vintage-boutique-v2
*/

:root{
  --tv-bg:#f6f0e6;
  --tv-paper:#fffaf2;
  --tv-paper-2:#f1e7d6;
  --tv-ink:#432619;
  --tv-ink-deep:#261913;
  --tv-muted:#806d60;
  --tv-line:#dfd1bf;
  --tv-accent:#b47742;
  --tv-accent-dark:#70452f;
  --tv-gold:#c99659;
  --tv-danger:#87372f;
  --tv-radius:20px;
  --tv-shadow:0 14px 42px rgba(73,45,28,.10);
  --tv-max:1260px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--tv-bg);color:var(--tv-ink-deep);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;line-height:1.65}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
button,input,select,textarea{font:inherit}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tv-container{width:min(var(--tv-max),calc(100% - 40px));margin-inline:auto}

/* Announcement */
.tv-announcement{background:var(--tv-ink-deep);color:#f7ebdc;text-align:center;font-size:10px;letter-spacing:.14em;padding:8px 16px;display:flex;justify-content:center;gap:10px;flex-wrap:wrap;text-transform:uppercase}
.tv-announcement i{font-style:normal;color:var(--tv-gold)}

/* Header */
.tv-header{position:sticky;top:0;z-index:100;background:rgba(246,240,230,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--tv-line)}
.admin-bar .tv-header{top:32px}
.tv-header-main{display:grid;grid-template-columns:auto minmax(320px,1fr) auto;gap:24px;align-items:center;padding:13px 0}
.tv-brand{display:flex;align-items:center;gap:12px;min-width:265px}
.tv-brand .custom-logo,.tv-brand-mark-img{width:62px;height:62px;object-fit:cover;border-radius:50%;border:1px solid rgba(112,69,47,.18);box-shadow:0 4px 14px rgba(67,38,25,.07)}
.tv-brand-text strong{font-family:Georgia,"Times New Roman",serif;font-size:25px;letter-spacing:.025em;display:block;line-height:1;color:var(--tv-ink)}
.tv-brand-text small{display:block;color:var(--tv-muted);font-size:10px;letter-spacing:.08em;margin-top:6px;white-space:nowrap;text-transform:uppercase}
.tv-product-search{display:flex;background:rgba(255,250,242,.82);border:1px solid var(--tv-line);border-radius:999px;overflow:hidden;min-height:45px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.tv-product-search input{border:0;background:transparent;padding:0 18px;min-width:0;width:100%;outline:0;color:var(--tv-ink-deep)}
.tv-product-search input::placeholder{color:#a18f82}
.tv-product-search button{border:0;background:transparent;padding:0 18px;cursor:pointer;color:var(--tv-accent-dark);font-size:17px}
.tv-header-actions{display:flex;align-items:center;gap:10px}
.tv-icon-link{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--tv-line);background:var(--tv-paper);border-radius:50%;font-size:18px}
.tv-cart-count{position:absolute;right:-4px;top:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--tv-accent);color:#fff;display:grid;place-items:center;font-size:10px}
.tv-menu-toggle{display:none;border:1px solid var(--tv-line);background:var(--tv-paper);border-radius:50%;width:44px;height:44px}
.tv-nav{border-top:1px solid rgba(223,209,191,.8);background:rgba(255,250,242,.5)}
.tv-nav-inner{display:flex;justify-content:center;align-items:center;min-height:48px}
.tv-nav ul{list-style:none;margin:0;padding:0;display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap}
.tv-nav a{font-size:11px;font-weight:750;letter-spacing:.045em;text-transform:uppercase;padding:14px 0;display:block;position:relative}
.tv-nav a:after{content:"";position:absolute;left:0;right:100%;bottom:10px;height:1px;background:var(--tv-accent);transition:.2s ease}
.tv-nav a:hover{color:var(--tv-accent-dark)}
.tv-nav a:hover:after{right:0}

/* Hero */
.tv-hero{padding:40px 0 22px}
.tv-hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:24px;align-items:stretch}
.tv-hero-copy,.tv-hero-brand{border:1px solid var(--tv-line);border-radius:28px;box-shadow:var(--tv-shadow);overflow:hidden}
.tv-hero-copy{padding:48px 50px 44px;background:linear-gradient(145deg,#fffaf2 0%,#fbf4e9 100%);position:relative}
.tv-hero-copy:after{content:"";position:absolute;inset:auto -90px -130px auto;width:360px;height:360px;background:url('assets/images/brand-pattern.webp') center/cover no-repeat;opacity:.07;border-radius:50%}
.tv-kicker,.tv-eyebrow{font-size:11px;letter-spacing:.17em;text-transform:uppercase;color:var(--tv-accent-dark);font-weight:800}
.tv-hero h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(44px,4.7vw,66px);line-height:1.03;font-weight:500;margin:15px 0 18px;letter-spacing:-.03em;position:relative;z-index:1}
.tv-hero p{max-width:650px;color:var(--tv-muted);font-size:16px;margin:0 0 16px;position:relative;z-index:1}
.tv-brand-quote{font-family:Georgia,"Times New Roman",serif;color:var(--tv-accent-dark);font-size:19px;font-style:italic;margin:18px 0 26px;position:relative;z-index:1}
.tv-btns{display:flex;gap:12px;flex-wrap:wrap;position:relative;z-index:1}
.tv-btn,.button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 21px;border-radius:999px;border:1px solid var(--tv-ink-deep)!important;background:var(--tv-ink-deep)!important;color:#fff!important;font-weight:750!important;transition:.2s ease;box-shadow:none!important}
.tv-btn:hover,.button:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{transform:translateY(-1px);background:var(--tv-accent-dark)!important;border-color:var(--tv-accent-dark)!important}
.tv-btn--ghost{background:transparent!important;color:var(--tv-ink-deep)!important;border-color:var(--tv-line)!important}
.tv-hero-brand{background:var(--tv-paper-2);min-height:400px;display:grid;place-items:center}
.tv-hero-brand img{width:100%;height:100%;object-fit:cover;display:block}
.tv-brand-values{padding:0 0 18px}
.tv-brand-values-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.tv-brand-value{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid rgba(223,209,191,.85);border-radius:16px;background:rgba(255,250,242,.62)}
.tv-brand-value b{font-family:Georgia,serif;font-size:15px;font-weight:600;color:var(--tv-ink)}
.tv-brand-value span{font-size:11px;color:var(--tv-muted);display:block;margin-top:1px}
.tv-brand-value-mark{width:34px;height:34px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;border:1px solid #d8c2a8;color:var(--tv-accent-dark);background:var(--tv-paper)}

/* Sections */
.tv-section{padding:28px 0 46px}
.tv-section--categories{padding-top:20px}
.tv-section--collectibles{background:rgba(255,250,242,.38);border-top:1px solid rgba(223,209,191,.65);border-bottom:1px solid rgba(223,209,191,.65)}
.tv-section--archive{background:#eee4d5}
.tv-section-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:18px}
.tv-section-head h2{font-family:Georgia,serif;font-weight:500;font-size:34px;margin:4px 0 0;color:var(--tv-ink)}
.tv-section-head p{margin:4px 0 0;color:var(--tv-muted)}
.tv-text-link{font-weight:700;color:var(--tv-accent-dark);white-space:nowrap}

/* Category cards */
.tv-cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.tv-cat-card{position:relative;background:var(--tv-paper);border:1px solid var(--tv-line);border-radius:18px;padding:17px 18px;min-height:118px;display:flex;align-items:center;gap:13px;overflow:hidden;transition:.22s ease;isolation:isolate}
.tv-cat-card:before{content:"";position:absolute;inset:0;background:var(--tv-cat-image,url('assets/images/brand-pattern.webp')) center/cover no-repeat;opacity:.10;filter:saturate(.7) sepia(.12);transition:.25s ease;z-index:-2}.tv-cat-card:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,250,242,.97) 0%,rgba(255,250,242,.91) 54%,rgba(255,250,242,.70) 100%);pointer-events:none;z-index:-1}
.tv-cat-card:hover{transform:translateY(-3px);box-shadow:var(--tv-shadow);border-color:#cfb89f}.tv-cat-card:hover:before{opacity:.18;transform:scale(1.025)}
.tv-cat-glyph{position:relative;z-index:1;width:44px;height:44px;border:1px solid #d9c2a8;border-radius:50%;display:grid;place-items:center;font-family:Georgia,"Times New Roman",serif;font-size:23px;color:var(--tv-accent-dark);background:rgba(255,250,242,.86);flex:0 0 auto}
.tv-cat-copy{position:relative;z-index:1;display:flex;flex-direction:column;min-width:0}
.tv-cat-card strong{font-family:"Times New Roman",Georgia,serif;font-size:20px;font-weight:500;line-height:1.15;word-break:normal;overflow-wrap:normal;hyphens:none}
.tv-cat-card small{color:var(--tv-muted);font-size:11.5px;margin-top:6px}

/* WooCommerce */
.tv-main{padding:36px 0 70px;min-height:60vh}
.woocommerce .woocommerce-breadcrumb{font-size:12px;color:var(--tv-muted);margin-bottom:22px}
.woocommerce .woocommerce-result-count,.woocommerce .woocommerce-ordering{margin-bottom:24px;color:var(--tv-muted);font-size:13px}
.woocommerce .woocommerce-ordering select{border:1px solid var(--tv-line);background:var(--tv-paper);border-radius:999px;padding:10px 34px 10px 14px}
.woocommerce ul.products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px!important;margin:0!important}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none!important}
.woocommerce ul.products li.product{width:auto!important;float:none!important;margin:0!important;background:rgba(255,250,242,.78);position:relative;border:1px solid rgba(223,209,191,.86);border-radius:18px;padding:9px 9px 14px!important;transition:.22s ease;display:flex!important;flex-direction:column!important;min-width:0}
.woocommerce ul.products li.product a img{aspect-ratio:1/1;object-fit:contain;margin:0 0 11px!important;border-radius:13px;background:#fff8ee;border:0;transition:.25s ease;padding:5px}
.woocommerce ul.products li.product:hover{transform:translateY(-3px);box-shadow:var(--tv-shadow);border-color:#cfb89f}.woocommerce ul.products li.product:hover a img{transform:none;box-shadow:none}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:12.5px!important;line-height:1.38;padding:0 4px!important;margin:0 0 8px!important;color:var(--tv-ink-deep);font-weight:760;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:35px;word-break:normal;overflow-wrap:normal;hyphens:none}
.woocommerce ul.products li.product .price{color:var(--tv-accent-dark)!important;font-size:14px!important;font-weight:800!important;margin:auto 4px 9px!important;padding-top:2px}
.woocommerce ul.products li.product .button{font-size:11px!important;min-height:38px!important;padding:0 16px!important;margin:3px 4px 0!important;text-transform:none;align-self:flex-start}
.tv-sold-badge{position:absolute;top:12px;left:12px;z-index:5;background:rgba(38,25,19,.94);color:#fff;border-radius:999px;padding:7px 11px;font-size:10px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}
.woocommerce span.onsale{background:var(--tv-accent)!important;min-height:auto!important;min-width:auto!important;line-height:1!important;padding:9px 11px!important;border-radius:999px!important;top:12px!important;left:12px!important;font-size:10px!important}

/* Product */
.woocommerce div.product{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(360px,.96fr);gap:48px;align-items:start}
.woocommerce div.product div.images,.woocommerce div.product div.summary{float:none!important;width:auto!important;margin:0!important}
.woocommerce div.product .product_title{font-family:Georgia,"Times New Roman",serif;font-size:40px;line-height:1.13;font-weight:500;margin-bottom:12px;color:var(--tv-ink);word-break:normal;overflow-wrap:normal;hyphens:none}
.woocommerce div.product p.price,.woocommerce div.product span.price{color:var(--tv-accent-dark)!important;font-size:24px!important;font-weight:800}
.woocommerce div.product .woocommerce-product-details__short-description{color:var(--tv-muted);font-size:15px}
.woocommerce div.product form.cart{display:flex;gap:10px;align-items:center;margin:24px 0!important}
.woocommerce .quantity .qty{min-height:44px;border:1px solid var(--tv-line);border-radius:12px;width:72px;background:var(--tv-paper)}
.stock.in-stock,.stock.out-of-stock{display:inline-flex;align-items:center;min-height:30px;padding:0 11px;border-radius:999px;font-size:12px;font-weight:800}.stock.in-stock{color:#44644b!important;background:#edf4ed}.stock.out-of-stock{color:var(--tv-danger)!important;background:#f6e9e5}
.woocommerce div.product .woocommerce-tabs{grid-column:1/-1;margin-top:18px}.woocommerce div.product .woocommerce-tabs ul.tabs{padding-left:0!important}.woocommerce div.product .woocommerce-tabs ul.tabs li{border-color:var(--tv-line)!important;background:var(--tv-paper)!important}
.woocommerce div.product .woocommerce-product-gallery__image img{border-radius:18px;background:var(--tv-paper)}
.tv-external-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 20px}.tv-external-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 18px;border-radius:999px;border:1px solid var(--tv-line);background:var(--tv-paper);font-size:13px;font-weight:700}.tv-external-actions a:hover{border-color:var(--tv-accent);color:var(--tv-accent-dark)}

/* Cart / checkout */
.woocommerce table.shop_table{border:1px solid var(--tv-line)!important;border-radius:16px!important;background:var(--tv-paper)}
.woocommerce-cart .cart-collaterals .cart_totals,.woocommerce-checkout-review-order{background:var(--tv-paper);border:1px solid var(--tv-line);border-radius:18px;padding:22px}
.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,.select2-container--default .select2-selection--single{border:1px solid var(--tv-line);border-radius:12px;background:var(--tv-paper);min-height:46px;padding:10px 12px}

/* Content */
.tv-content-card{background:var(--tv-paper);border:1px solid var(--tv-line);border-radius:22px;padding:34px;box-shadow:var(--tv-shadow)}
.tv-entry-title{font-family:Georgia,serif;font-size:42px;line-height:1.15;margin-top:0;color:var(--tv-ink)}

/* Footer */
.tv-footer{background:var(--tv-ink-deep);color:#eee4d9;margin-top:0}
.tv-footer-grid{display:grid;grid-template-columns:1.35fr .65fr .65fr;gap:46px;padding:48px 0}.tv-footer-grid.tv-footer-grid--2{grid-template-columns:minmax(0,1.55fr) minmax(220px,.65fr)}
.tv-footer-brandline{display:flex;align-items:center;gap:14px;margin-bottom:14px}.tv-footer-brandline img{width:58px;height:58px;border-radius:50%;object-fit:cover}.tv-footer h3,.tv-footer h4{font-family:"Times New Roman",Georgia,serif;margin:0 0 12px;word-break:normal;overflow-wrap:normal;hyphens:none}.tv-footer h3{font-size:23px}.tv-footer-slogan{color:#d2b99f;font-family:Georgia,serif;font-style:italic;font-size:14px;margin-top:4px}.tv-footer p,.tv-footer a{color:#cabeb3;font-size:13px}.tv-footer a:hover{color:#fff}.tv-footer-links{display:flex;flex-direction:column;gap:9px}.tv-copyright{border-top:1px solid rgba(255,255,255,.1);padding:16px 0;font-size:12px;color:#9e9186}

/* Mobile */
@media(max-width:1080px){.tv-nav ul{gap:14px}.tv-nav a{font-size:11px}}
@media(max-width:980px){
  .tv-header-main{grid-template-columns:1fr auto;gap:14px}.tv-product-search{grid-column:1/-1;grid-row:2}.tv-brand{min-width:0}.tv-menu-toggle{display:inline-flex;align-items:center;justify-content:center}.tv-nav{display:none}.tv-nav.is-open{display:block}.tv-nav-inner,.tv-nav ul{flex-direction:column;gap:0;align-items:stretch}.tv-nav a{padding:12px 0;border-bottom:1px solid var(--tv-line)}.tv-nav a:after{display:none}
  .tv-hero-grid{grid-template-columns:1fr}.tv-hero-brand{min-height:360px}.tv-cat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr))!important}.woocommerce div.product{grid-template-columns:1fr;gap:28px}.tv-footer-grid{grid-template-columns:1fr 1fr}.tv-footer-brand{grid-column:1/-1}
}
@media(max-width:680px){
  .admin-bar .tv-header{top:46px}.tv-container{width:min(100% - 24px,var(--tv-max))}.tv-announcement{font-size:9px;gap:7px}.tv-header-main{padding:10px 0}.tv-brand-text strong{font-size:20px}.tv-brand-text small{display:none}.tv-brand .custom-logo,.tv-brand-mark-img{width:50px;height:50px}.tv-icon-link{width:40px;height:40px}.tv-hero{padding-top:20px}.tv-hero-copy{padding:32px 24px}.tv-hero h1{font-size:42px}.tv-brand-quote{font-size:17px}.tv-hero-brand{min-height:auto;aspect-ratio:1/1}.tv-section{padding:24px 0 38px}.tv-section-head h2{font-size:30px}.tv-cat-grid{grid-template-columns:1fr 1fr;gap:10px}.tv-cat-card{padding:13px 12px;min-height:96px;align-items:center;gap:10px}.tv-cat-glyph{width:36px;height:36px;font-size:19px}.tv-cat-card strong{font-size:16px;line-height:1.16}.tv-cat-card small{font-size:10.5px;margin-top:4px}
  .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:12px!important}.woocommerce ul.products li.product .button{width:100%}.woocommerce div.product .product_title{font-size:34px}.tv-footer-grid{grid-template-columns:1fr;gap:24px;padding:38px 0}.tv-footer-brand{grid-column:auto}
}

/* Boutique refinement: homepage rows stay compact while catalog keeps a clean 4-column grid. */
.home .tv-section .woocommerce ul.products{grid-template-columns:repeat(auto-fit,minmax(210px,280px))!important;justify-content:start;gap:18px!important}
.home .tv-section .woocommerce ul.products li.product{max-width:280px}
.tv-section--archive .woocommerce ul.products li.product{opacity:.92}
.tv-section--archive .woocommerce ul.products li.product:hover{opacity:1}

@media(max-width:980px){
  .tv-brand-values-grid{grid-template-columns:repeat(3,1fr)}
  .home .tv-section .woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .home .tv-section .woocommerce ul.products li.product{max-width:none}
}
@media(max-width:680px){
  .tv-brand-values{padding-bottom:10px}.tv-brand-values-grid{grid-template-columns:1fr;gap:8px}.tv-brand-value{padding:10px 12px}.tv-brand-value-mark{width:30px;height:30px}
  .home .tv-section .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tv-section-head{align-items:flex-start}.tv-text-link{font-size:12px;margin-top:8px}
}


/* 2.2 polish */
.tv-nav a,.tv-brand-text strong,.tv-section-head h2,.tv-footer h3,.tv-footer h4,.tv-cat-card strong{font-kerning:normal;text-rendering:optimizeLegibility}
.tv-cat-card strong,.tv-footer h4{unicode-bidi:plaintext}
.home .tv-section:not(.tv-section--archive) .woocommerce ul.products li.product{box-shadow:0 5px 18px rgba(73,45,28,.035)}
.home .tv-section .woocommerce ul.products li.product:hover{box-shadow:0 13px 34px rgba(73,45,28,.09)}
.woocommerce ul.products li.product .woocommerce-loop-product__link{display:block}
.woocommerce div.product .summary{background:rgba(255,250,242,.48);border:1px solid rgba(223,209,191,.72);border-radius:20px;padding:26px 28px}
.woocommerce div.product .product_meta{font-size:12px;color:var(--tv-muted);border-top:1px solid var(--tv-line);padding-top:16px;margin-top:18px}
.woocommerce div.product .woocommerce-tabs .panel{background:rgba(255,250,242,.55);border:1px solid rgba(223,209,191,.75);border-radius:0 16px 16px 16px;padding:24px!important}
.related.products>h2,.upsells.products>h2{font-family:Georgia,"Times New Roman",serif;font-size:30px;font-weight:500;color:var(--tv-ink);margin-top:42px}

@media(max-width:680px){
  .tv-announcement span:nth-of-type(n+3),.tv-announcement i:nth-of-type(n+3){display:none}
  .tv-header-main{gap:10px}.tv-brand{gap:9px}.tv-brand-text strong{font-size:18px;white-space:nowrap}.tv-product-search{min-height:42px}
  .tv-hero-copy{padding:28px 21px}.tv-hero h1{font-size:39px}.tv-hero p{font-size:14px}.tv-btn{min-height:42px;padding:0 17px;font-size:13px}
  .tv-section-head{gap:10px}.tv-section-head h2{font-size:28px}.tv-section-head p{font-size:13px}
  .woocommerce ul.products li.product{padding:7px 7px 11px!important;border-radius:15px}.woocommerce ul.products li.product a img{border-radius:11px;padding:3px;margin-bottom:9px!important}
  .woocommerce ul.products li.product .price{font-size:13px!important;margin-left:3px!important;margin-right:3px!important}.woocommerce ul.products li.product .button{font-size:10.5px!important;padding:0 10px!important;min-height:36px!important;margin-left:3px!important;margin-right:3px!important}
  .woocommerce div.product .summary{padding:20px 18px}.woocommerce div.product .product_title{font-size:31px}.woocommerce div.product form.cart{align-items:stretch;flex-wrap:wrap}.woocommerce div.product form.cart .single_add_to_cart_button{flex:1;min-width:180px}
  .tv-footer-grid.tv-footer-grid--2{grid-template-columns:1fr}
}


/* 2.3 product & catalog refinement */
/* Keep the boutique voice calm: product details are useful, not salesy. */
.post-type-archive-product .tv-main,
.tax-product_cat .tv-main,
.search-results .tv-main{padding-top:30px}
.woocommerce-products-header__title.page-title{font-family:Georgia,"Times New Roman",serif;font-weight:500;color:var(--tv-ink);font-size:38px;line-height:1.1;margin:0 0 18px}
.woocommerce .woocommerce-result-count{margin-top:2px}

/* Single product: a calmer, more balanced editorial layout. */
.single-product .tv-main{padding-top:30px}
.single-product .woocommerce div.product{grid-template-columns:minmax(0,1fr) minmax(360px,.82fr);gap:38px;align-items:start}
.single-product .woocommerce div.product div.images{width:100%!important;max-width:590px;justify-self:center}
.single-product .woocommerce div.product .woocommerce-product-gallery__wrapper{margin:0!important}
.single-product .woocommerce div.product .woocommerce-product-gallery__image>a{display:flex;align-items:center;justify-content:center;background:#fff8ee;border-radius:18px;overflow:hidden}
.single-product .woocommerce div.product .woocommerce-product-gallery__image img{width:100%;height:auto;max-height:540px;object-fit:contain;border-radius:18px;background:#fff8ee}
.single-product .woocommerce div.product div.images .flex-control-thumbs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0 0!important;padding:0!important}
.single-product .woocommerce div.product div.images .flex-control-thumbs li{float:none!important;width:auto!important;margin:0!important;list-style:none}
.single-product .woocommerce div.product div.images .flex-control-thumbs img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:10px;background:#fff8ee;border:1px solid transparent;opacity:.78;transition:.18s ease}
.single-product .woocommerce div.product div.images .flex-control-thumbs img.flex-active,
.single-product .woocommerce div.product div.images .flex-control-thumbs img:hover{opacity:1;border-color:#cfae8a}
.single-product .woocommerce div.product .summary{padding:28px 30px;box-shadow:0 8px 28px rgba(73,45,28,.045)}
.single-product .woocommerce div.product .product_title{font-size:36px;line-height:1.14;margin:0 0 13px}
.single-product .woocommerce div.product p.price,
.single-product .woocommerce div.product span.price{font-size:22px!important;margin:0 0 15px;display:block}
.single-product .woocommerce div.product .woocommerce-product-details__short-description{font-size:14px;line-height:1.7;margin:0 0 15px;color:var(--tv-muted)}
.single-product .woocommerce div.product .summary .stock{margin:4px 0 13px}
.single-product .woocommerce div.product form.cart{margin:13px 0 16px!important}
.single-product .woocommerce div.product .product_meta{font-size:11px;line-height:1.8;padding-top:14px;margin-top:14px}
.single-product .woocommerce div.product .product_meta>span{display:inline-block;margin-right:10px}

/* Tabs/reviews stay enabled from the start. */
.single-product .woocommerce div.product .woocommerce-tabs{margin-top:26px}
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs{margin:0 0 -1px!important}
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs:before{border-bottom-color:var(--tv-line)!important}
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li{border-color:var(--tv-line)!important;background:#f8f1e7!important;border-radius:12px 12px 0 0!important;margin-right:5px!important}
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:var(--tv-paper)!important}
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li a{font-size:12px;font-weight:750;padding:10px 14px!important}
.single-product .woocommerce div.product .woocommerce-tabs .panel{padding:28px 30px!important;line-height:1.72}
.single-product .woocommerce div.product .woocommerce-tabs .panel>h2:first-child{font-family:Georgia,"Times New Roman",serif;font-weight:500;color:var(--tv-ink);font-size:25px;margin:0 0 20px}
.single-product .woocommerce-Tabs-panel--description p{margin:0 0 12px}
.single-product .woocommerce-Tabs-panel--description .tv-desc-section-title{font-family:Georgia,"Times New Roman",serif;color:var(--tv-ink);font-size:16px;font-weight:700;letter-spacing:.015em;margin:25px 0 10px!important;padding-top:3px}
.single-product .woocommerce-Tabs-panel--description .tv-desc-section-title:first-of-type{margin-top:4px!important}
.single-product .woocommerce-Tabs-panel--description .tv-desc-hashtags{display:none!important}
.single-product .woocommerce-Tabs-panel--description ul,
.single-product .woocommerce-Tabs-panel--description ol{padding-left:21px;margin:8px 0 18px}
.single-product .woocommerce-Tabs-panel--description li{margin-bottom:5px}
.single-product #reviews #comments h2,
.single-product #review_form_wrapper .comment-reply-title{font-family:Georgia,"Times New Roman",serif;color:var(--tv-ink);font-weight:500}

/* Sold items remain visible as archive records, with no purchase button. */
.single-product .stock.out-of-stock{background:#eee4d9!important;color:#70452f!important}
.woocommerce ul.products li.product.outofstock .button{display:none!important}

/* Related products remain visually secondary. */
.single-product .related.products,
.single-product .upsells.products{grid-column:1/-1;margin-top:8px}
.single-product .related.products ul.products,
.single-product .upsells.products ul.products{grid-template-columns:repeat(4,minmax(0,1fr))!important}

@media(max-width:980px){
  .single-product .woocommerce div.product{grid-template-columns:1fr;gap:24px}
  .single-product .woocommerce div.product div.images{max-width:620px;justify-self:center}
  .single-product .woocommerce div.product .summary{max-width:760px;width:100%;justify-self:center}
  .single-product .related.products ul.products,
  .single-product .upsells.products ul.products{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:680px){
  .woocommerce-products-header__title.page-title{font-size:31px}
  .single-product .tv-main{padding-top:18px}
  .single-product .woocommerce div.product .summary{padding:19px 17px}
  .single-product .woocommerce div.product .product_title{font-size:28px;line-height:1.16}
  .single-product .woocommerce div.product p.price,
  .single-product .woocommerce div.product span.price{font-size:19px!important}
  .single-product .woocommerce div.product .woocommerce-tabs .panel{padding:20px 17px!important}
  .single-product .woocommerce div.product div.images .flex-control-thumbs{gap:6px}
  .single-product .woocommerce div.product div.images .flex-control-thumbs img{border-radius:8px}
  .single-product .related.products ul.products,
  .single-product .upsells.products ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* 2.4 final polish: catalog alignment + calmer product detail proportions */
/* Catalog header/toolbar feels intentional even before the catalog is full. */
.post-type-archive-product .woocommerce-products-header,
.tax-product_cat .woocommerce-products-header,
.search-results .woocommerce-products-header{
  margin-bottom:10px;
}
.tv-shop-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 0 18px;
  margin:0 0 4px;
  border-bottom:1px solid rgba(223,209,191,.72);
}
.tv-shop-toolbar .woocommerce-result-count,
.tv-shop-toolbar .woocommerce-ordering{
  float:none!important;
  margin:0!important;
}
.tv-shop-toolbar .woocommerce-result-count{
  font-size:12px;
  color:var(--tv-muted);
}
.tv-shop-toolbar .woocommerce-ordering select{
  min-width:180px;
  background-color:rgba(255,250,242,.82);
}

/* Product cards: just a little more readable without becoming sales-heavy. */
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:13.5px!important;
  line-height:1.4;
  min-height:38px;
}
.woocommerce ul.products li.product .price{
  font-size:15px!important;
  margin-bottom:10px!important;
}

/* Single product: reduce visual dominance of the gallery and tighten the summary. */
.single-product .woocommerce div.product{
  grid-template-columns:minmax(0,1fr) minmax(340px,.76fr);
  gap:44px;
}
.single-product .woocommerce div.product div.images{
  max-width:535px;
}
.single-product .woocommerce div.product .woocommerce-product-gallery__image img{
  max-height:495px;
}
.single-product .woocommerce div.product .summary{
  width:100%!important;
  max-width:515px;
  justify-self:end;
  padding:26px 28px;
}
.single-product .woocommerce div.product .product_title{
  font-size:34px;
  line-height:1.15;
  margin-bottom:12px;
}
.single-product .woocommerce div.product p.price,
.single-product .woocommerce div.product span.price{
  font-size:21px!important;
}
.single-product .woocommerce div.product .woocommerce-product-details__short-description{
  max-width:46em;
}
.single-product .woocommerce div.product .product_meta{
  color:#8d7a6e;
}

/* Description remains editorial and easy to scan. */
.single-product .woocommerce div.product .woocommerce-tabs .panel{
  max-width:100%;
}
.single-product .woocommerce-Tabs-panel--description{
  font-size:14px;
}
.single-product .woocommerce-Tabs-panel--description .tv-desc-section-title{
  margin-top:23px!important;
}

@media(max-width:980px){
  .single-product .woocommerce div.product .summary{
    max-width:720px;
    justify-self:center;
  }
}
@media(max-width:680px){
  .tv-shop-toolbar{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }
  .tv-shop-toolbar .woocommerce-ordering,
  .tv-shop-toolbar .woocommerce-ordering select{
    width:100%;
  }
  .woocommerce ul.products li.product .woocommerce-loop-product__title{
    font-size:12.5px!important;
    min-height:35px;
  }
  .woocommerce ul.products li.product .price{
    font-size:13.5px!important;
  }
  .single-product .woocommerce div.product div.images{
    max-width:100%;
  }
  .single-product .woocommerce div.product .woocommerce-product-gallery__image img{
    max-height:none;
  }
  .single-product .woocommerce div.product .summary{
    max-width:none;
    padding:19px 17px;
  }
  .single-product .woocommerce div.product .product_title{
    font-size:28px;
  }
}
