/* =========================================================================
   AGROLATVIJA — Single product PDP (prototype match) over WoodMart.
   Scoped to body.agro-product-page. Colours/fonts inherit WoodMart theme options.
   ========================================================================= */
body.agro-product-page{
	--brand: var(--wd-primary-color, #0F3D2E);
	--brand-2: color-mix(in srgb, var(--wd-primary-color, #0F3D2E) 82%, #fff);
	--accent: var(--wd-alternative-color, #E8B84C); --accent-ink:#3D2E00;
	--red:#B43A2E; --ok:#3E8A5A;
	--surface:#FFFFFF; --surface-2:#EFEBE2;
	--ink: var(--wd-title-color, #121512); --ink-2: var(--wd-text-color,#3D4440); --ink-3: var(--wd-text-color,#6B736E);
	--line: var(--wd-form-brd-color, #E3DFD5); --line-2:#D4CEBE;
	--pill:999px;
	--font: var(--wd-text-font, "Inter Tight", system-ui, sans-serif);
	--mono:"JetBrains Mono", ui-monospace, monospace;
}
body.agro-product-page .agro-pdp,
body.agro-product-page .pdp-info{ font-family:var(--font); color:var(--ink); }

/* ---- 2-col PDP grid ---- */
body.agro-product-page .agro-pdp-grid{ display:grid; grid-template-columns:1.15fr 1fr; gap:48px; margin:24px 0 48px; }
body.agro-product-page .agro-pdp .pdp-gallery{ position:relative; }

/* WooCommerce gallery → prototype look */
body.agro-product-page .woocommerce-product-gallery{ margin:0 !important; width:100% !important; float:none !important; }
body.agro-product-page .woocommerce-product-gallery .flex-viewport,
body.agro-product-page .woocommerce-product-gallery__wrapper{ border:1px solid var(--line); border-radius:20px; overflow:hidden; background:var(--surface); }
body.agro-product-page .woocommerce-product-gallery .flex-control-thumbs{ display:grid !important; grid-template-columns:repeat(5,1fr); gap:10px; margin:12px 0 0 !important; padding:0; list-style:none; }
body.agro-product-page .woocommerce-product-gallery .flex-control-thumbs li{ margin:0 !important; width:auto !important; }
body.agro-product-page .woocommerce-product-gallery .flex-control-thumbs img{ border:1px solid var(--line); border-radius:10px; opacity:.7; transition:.15s; }
body.agro-product-page .woocommerce-product-gallery .flex-control-thumbs img:hover,
body.agro-product-page .woocommerce-product-gallery .flex-control-thumbs .flex-active{ opacity:1; border-color:var(--brand); }
body.agro-product-page .onsale{ position:absolute; top:12px; left:12px; z-index:2; background:var(--red) !important; color:#fff !important;
	border-radius:var(--pill) !important; font-family:var(--mono); font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:5px 10px; min-height:0; min-width:0; }

/* ---- info column ---- */
body.agro-product-page .pdp-info{ float:none !important; width:100% !important; margin:0 !important; }
.pdp-brand{ font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; color:var(--ink-3); text-transform:uppercase; }
body.agro-product-page .pdp-info h1.product_title{ font-size:34px; letter-spacing:-.02em; line-height:1.1; margin:4px 0 10px; font-weight:700; color:var(--ink); }
.pdp-meta{ display:flex; gap:12px; align-items:center; color:var(--ink-3); font-size:13px; flex-wrap:wrap; }
.pdp-meta .star-rating{ margin:0; }
.pdp-dot{ color:var(--line-2); }
.pdp-instock{ display:inline-flex; align-items:center; gap:6px; color:var(--ok); }
.pdp-instock .d{ width:8px; height:8px; border-radius:999px; background:var(--ok); }
.pdp-oos{ color:var(--ink-3); }
.pdp-sku{ font-family:var(--mono); font-size:12px; }

/* highlights */
.pdp-highlights{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:18px 0 4px; }
.pdp-hl{ display:flex; gap:11px; align-items:center; padding:11px 13px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.pdp-hl svg{ color:var(--brand); flex:none; }
.pdp-hl .v{ font-weight:700; font-size:14px; color:var(--ink); line-height:1.2; }
.pdp-hl .k{ font-size:11px; color:var(--ink-3); text-transform:uppercase; letter-spacing:.03em; font-family:var(--mono); }

/* pricebox */
.pdp-pricebox{ margin:20px 0; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:16px; }
body.agro-product-page .pdp-pricebox .price{ display:flex; align-items:baseline; gap:12px; margin:0 !important; font-size:30px !important; font-weight:700 !important; color:var(--ink) !important; font-variant-numeric:tabular-nums; }
body.agro-product-page .pdp-pricebox .price del{ font-size:16px; color:var(--ink-3); opacity:1; font-weight:400; }
body.agro-product-page .pdp-pricebox .price ins{ text-decoration:none; color:var(--ink); font-weight:700; }
.pdp-vat{ font-size:12.5px; color:var(--ink-3); margin-top:6px; }
.pdp-finance{ margin-top:14px; padding-top:14px; border-top:1px dashed var(--line); display:flex; gap:10px; align-items:center; font-size:13px; color:var(--ink-2); }
.pdp-finance svg{ color:var(--accent-ink); flex:none; }
.pdp-finance strong{ font-variant-numeric:tabular-nums; }

/* actions */
.pdp-actions{ display:flex; gap:10px; margin:18px 0; flex-wrap:wrap; align-items:stretch; }
body.agro-product-page .pdp-actions form.cart{ display:flex; gap:10px; margin:0; flex:1 1 auto; align-items:stretch; flex-wrap:wrap; }
body.agro-product-page .pdp-actions .quantity{ display:inline-flex; align-items:center; border:1px solid var(--line-2); border-radius:var(--pill); background:var(--surface); overflow:hidden; }
body.agro-product-page .pdp-actions .quantity input.qty{ border:none; background:none; width:44px; text-align:center; font-family:var(--font); font-weight:600; }
body.agro-product-page .pdp-actions .single_add_to_cart_button{ flex:1 1 auto; background:var(--brand) !important; color:#fff !important;
	border:none !important; border-radius:var(--pill) !important; font-weight:600 !important; box-shadow:none !important; padding:14px 24px !important; }
body.agro-product-page .pdp-actions .single_add_to_cart_button:hover{ background:var(--brand-2) !important; }
.pdp-finance-btn{ display:inline-flex; align-items:center; justify-content:center; background:var(--accent) !important; color:var(--accent-ink) !important;
	border-radius:var(--pill) !important; font-weight:600 !important; padding:14px 22px !important; border:none !important; text-decoration:none; white-space:nowrap; }

/* subactions */
.pdp-subactions{ display:flex; gap:8px; margin:-4px 0 18px; flex-wrap:wrap; }
.pdp-cmp{ display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border:1px solid var(--line-2); background:var(--surface);
	border-radius:var(--pill); font-size:13px; font-weight:600; color:var(--ink-2); text-decoration:none; transition:.15s; }
.pdp-cmp:hover{ border-color:var(--brand); color:var(--brand); }
.pdp-cmp svg{ flex:none; }

/* compatibility */
.pdp-compat{ margin:0 0 16px; padding:16px 18px; border:1px solid var(--line); border-radius:14px;
	background:linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--surface)), var(--surface)); }
.pdp-compat__head{ display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.pdp-compat__head svg{ color:var(--brand); flex:none; }
.pdp-compat__head strong{ font-size:14.5px; color:var(--ink); }
.pdp-compat__count{ margin-left:auto; font-family:var(--mono); font-size:11.5px; color:var(--ink-3); }
.pdp-compat__chips{ display:flex; flex-wrap:wrap; gap:7px; }
.pdp-chip{ font-size:12.5px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--pill); padding:4px 11px; color:var(--ink); }
.pdp-chip--more{ background:transparent; color:var(--brand); font-weight:600; }

/* delivery / stores / feats */
.pdp-delivery{ border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-bottom:16px; }
.pdp-deliv-row{ display:flex; gap:12px; align-items:flex-start; padding:14px 16px; background:var(--surface); }
.pdp-deliv-row + .pdp-deliv-row{ border-top:1px solid var(--line); }
.pdp-deliv-row svg{ color:var(--brand); flex:none; margin-top:1px; }
.pdp-deliv-row .t{ font-size:14px; color:var(--ink); }
.pdp-deliv-row .d{ font-size:12.5px; color:var(--ink-3); margin-top:1px; }
.pdp-stores{ border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:6px 16px 10px; margin-bottom:16px; }
.pdp-stores-head{ font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); padding:12px 0 8px; border-bottom:1px solid var(--line); }
.pdp-store{ display:flex; align-items:center; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--line); }
.pdp-store:last-child{ border-bottom:none; }
.pdp-store-loc{ display:flex; flex-direction:column; }
.pdp-store-loc .city{ font-weight:600; font-size:13.5px; }
.pdp-store-loc .addr{ font-size:12px; color:var(--ink-3); }
.pdp-store-stat{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; }
.pdp-store-stat .dot{ width:7px; height:7px; border-radius:999px; background:currentColor; }
.pdp-store-stat.in{ color:var(--ok); } .pdp-store-stat.low{ color:#9a7415; } .pdp-store-stat.order{ color:var(--ink-3); }
.pdp-feats{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.pdp-feat{ display:flex; gap:10px; align-items:center; }
.pdp-feat .icon{ width:32px; height:32px; border-radius:8px; background:var(--surface-2); color:var(--brand); display:grid; place-items:center; flex:none; }
.pdp-feat .t{ font-size:13px; font-weight:600; color:var(--ink); }
.pdp-feat .d{ font-size:11.5px; color:var(--ink-3); }

/* ---- tabs ---- */
body.agro-product-page .woocommerce-tabs{ margin-top:8px; }
body.agro-product-page .woocommerce-tabs ul.tabs{ border:none !important; padding:0 !important; margin:0 0 4px !important; display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid var(--line) !important; }
body.agro-product-page .woocommerce-tabs ul.tabs::before{ display:none !important; }
body.agro-product-page .woocommerce-tabs ul.tabs li{ border:none !important; background:none !important; margin:0 !important; padding:0 !important; border-radius:0 !important; }
body.agro-product-page .woocommerce-tabs ul.tabs li::before,
body.agro-product-page .woocommerce-tabs ul.tabs li::after{ display:none !important; }
body.agro-product-page .woocommerce-tabs ul.tabs li a{ display:block; padding:14px 18px !important; font-family:var(--font); font-weight:500; font-size:14px; color:var(--ink-3) !important; border-bottom:2px solid transparent; margin-bottom:-1px; }
body.agro-product-page .woocommerce-tabs ul.tabs li.active a,
body.agro-product-page .woocommerce-tabs ul.tabs li a:hover{ color:var(--brand) !important; border-bottom-color:var(--brand); }
body.agro-product-page .woocommerce-tabs .panel{ padding-top:24px; color:var(--ink-2); }
body.agro-product-page .woocommerce-tabs .panel h2{ color:var(--ink); font-weight:700; letter-spacing:-.01em; }
body.agro-product-page table.shop_attributes{ background:var(--surface); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
body.agro-product-page table.shop_attributes th{ color:var(--ink); font-weight:600; background:var(--surface-2); }
body.agro-product-page table.shop_attributes td{ color:var(--ink-2); font-style:normal; }
body.agro-product-page table.shop_attributes tr{ border-color:var(--line); }

/* ---- related ---- */
body.agro-product-page .related.products > h2,
body.agro-product-page .upsells.products > h2{ font-size:clamp(20px,2.2vw,26px); color:var(--ink); font-weight:700; letter-spacing:-.01em; margin-bottom:18px; }
body.agro-product-page .related .wd-product .product-wrapper,
body.agro-product-page .upsells .wd-product .product-wrapper{ border:1px solid var(--line); border-radius:14px; overflow:hidden; }
body.agro-product-page .related .wd-product .add_to_cart_button,
body.agro-product-page .related .wd-product .button{ background:var(--brand) !important; color:#fff !important; border-radius:var(--pill) !important; font-weight:600 !important; }

/* ---- responsive ---- */
@media (max-width:1000px){ body.agro-product-page .agro-pdp-grid{ grid-template-columns:1fr; gap:28px; } }
@media (max-width:600px){ .pdp-highlights, .pdp-feats{ grid-template-columns:1fr; } body.agro-product-page .pdp-info h1.product_title{ font-size:26px; } }
