/* ============================================================
   Product page. Prefix: pd-   (cards and breadcrumbs reuse category.css)
   ============================================================ */
main#content.site-main:has(> .pd){max-width:none !important;width:100% !important;padding:0 !important;margin:0 !important;}
.pd{--y:var(--agri-yellow,#F0FE06);max-width:1280px;margin:0 auto;padding:16px 16px 56px;color:#111;}
.pd *{box-sizing:border-box;}
.pd a{color:#111;}
.pd .woocommerce-message,.pd .woocommerce-error,.pd .woocommerce-info{margin:0 0 16px;}

/* Top: gallery + buy box */
.pd-top{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:36px;align-items:start;margin-bottom:36px;}

/* Gallery */
.pd-gallery__main{position:relative;aspect-ratio:1/1;max-height:560px;border:1px solid rgba(0,0,0,.1);border-radius:16px;background:#fff;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.pd-gallery__slide{display:flex;align-items:center;justify-content:center;width:100%;height:100%;cursor:zoom-in;}
.pd-gallery__slide[hidden]{display:none;}
.pd-gallery__img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block;}
.pd-gallery__zoom{position:absolute;right:12px;bottom:12px;width:40px;height:40px;border-radius:50%;border:1px solid rgba(0,0,0,.15);background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;}
.pd-gallery__zoom svg{width:22px;height:22px;fill:#111;}
.pd-gallery__thumbs{list-style:none;margin:10px 0 0;padding:0;display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;}
.pd-gallery__thumb{width:72px;height:72px;padding:4px;border:2px solid rgba(0,0,0,.12);border-radius:10px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.pd-gallery__thumb img{max-width:100%;max-height:100%;object-fit:contain;}
.pd-gallery__thumb.is-active{border-color:#111;}
.pd-gallery__main--empty img{opacity:.5;}

/* Lightbox */
.pd-lightbox{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center;padding:24px;}
.pd-lightbox[hidden]{display:none;}
.pd-lightbox img{max-width:100%;max-height:100%;object-fit:contain;background:#fff;border-radius:8px;}
.pd-lightbox__close{position:absolute;top:16px;right:16px;width:44px;height:44px;border-radius:50%;border:0;background:#fff;font-size:26px;line-height:1;cursor:pointer;}

/* Buy box */
.pd-buy__meta{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 6px;font-size:13px;color:#555;}
.pd-buy__brand{text-transform:uppercase;letter-spacing:.06em;font-weight:700;color:#111;}
.pd-buy__title{margin:0 0 8px;font-size:clamp(22px,2.6vw,30px);line-height:1.15;font-weight:900;}
.pd-buy__rating{display:inline-flex;align-items:center;gap:8px;margin:0 0 12px;font-size:13px;color:#444;text-decoration:none;}
.pd-buy__rating:hover span:last-child{text-decoration:underline;}
.pd-stars{position:relative;display:inline-block;font-size:16px;line-height:1;color:#ddd;letter-spacing:1px;}
.pd-stars>span{position:absolute;left:0;top:0;width:var(--r,0%);overflow:hidden;white-space:nowrap;color:#f0b400;}
.pd-price{margin:0 0 8px;}
.pd-price__main{font-size:30px;font-weight:900;line-height:1.1;}
.pd-price__main del{font-size:18px;font-weight:500;color:#888;margin-right:8px;}
.pd-price__main ins{text-decoration:none;}
.pd-price__main .agri-vat-suffix{font-size:14px;font-weight:600;color:#555;margin-left:4px;}
.pd-price__other{font-size:14px;color:#555;margin-top:2px;}
.pd-stock{margin:0 0 14px;font-weight:700;font-size:14px;}
.pd-stock.is-in{color:#1a7f37;}
.pd-stock.is-out{color:#b00020;}
.pd-delivery{list-style:none;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(0,0,0,.12);border-radius:12px;background:#fafafa;display:grid;gap:8px;font-size:14px;line-height:1.4;}
.pd-delivery li{display:flex;gap:10px;align-items:flex-start;}
.pd-delivery svg{width:22px;height:22px;flex:0 0 22px;color:#111;margin-top:1px;}

/* WooCommerce add-to-cart form, restyled */
.pd-form form.cart{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch;margin:0 0 14px;}
.pd-form .quantity{display:inline-flex;align-items:center;border:2px solid #111;border-radius:12px;overflow:hidden;height:52px;}
.pd-form .quantity input.qty{width:56px;height:100%;border:0;text-align:center;font-size:16px;font-weight:700;-moz-appearance:textfield;}
.pd-form .quantity input.qty::-webkit-outer-spin-button,.pd-form .quantity input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.pd-form .pd-qty__btn{width:42px;height:100%;border:0;background:#fff;font-size:20px;font-weight:700;cursor:pointer;}
.pd-form .pd-qty__btn:hover{background:#f0f0f0;}
.pd-form .single_add_to_cart_button,.pd-form button.button{flex:1 1 200px;height:52px;border:0;border-radius:12px;background:#111 !important;color:var(--y) !important;font-weight:800;font-size:16px;cursor:pointer;padding:0 20px;}
.pd-form .single_add_to_cart_button:hover{background:#000 !important;}
.pd-form .single_add_to_cart_button.disabled,.pd-form .single_add_to_cart_button:disabled{opacity:.5;cursor:not-allowed;}
.pd-form .variations{width:100%;margin:0 0 4px;border-collapse:collapse;}
.pd-form .variations td,.pd-form .variations th{padding:4px 0;border:0;display:block;text-align:left;}
.pd-form .variations th.label{font-weight:700;font-size:14px;}
.pd-form .variations select{width:100%;height:48px;border:2px solid #111;border-radius:10px;padding:0 12px;font-size:15px;background:#fff;}
.pd-form .reset_variations{font-size:13px;margin-left:8px;}
.pd-form .woocommerce-variation{width:100%;}
.pd-form .woocommerce-variation-price{font-size:22px;font-weight:900;margin:6px 0;}
.pd-form .woocommerce-variation-availability{font-size:14px;font-weight:700;}
.pd-form .woocommerce-variation-add-to-cart{display:flex;gap:10px;flex-wrap:wrap;width:100%;}
.pd-form .stock.out-of-stock{color:#b00020;font-weight:700;}
.pd-form .added_to_cart{display:none;}
.pd-form form.cart > .stock,.pd-form > p.stock{display:none;}
.pd-form #wc-stripe-express-checkout-element{margin-top:12px !important;}

/* Trust row and key specs */
.pd-trust{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:#444;}
.pd-trust li::before{content:"✓";color:#1a7f37;font-weight:900;margin-right:6px;}
.pd-keyspecs{margin:0;padding:12px 0 0;border-top:1px solid rgba(0,0,0,.1);display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px 16px;}
.pd-keyspecs div{display:flex;flex-direction:column;}
.pd-keyspecs dt{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#777;}
.pd-keyspecs dd{margin:0;font-weight:700;font-size:14px;}

/* Body: main + aside */
.pd-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:40px;align-items:start;margin-bottom:40px;}
.pd-section{margin:0 0 30px;}
.pd-section h2{margin:0 0 10px;font-size:22px;font-weight:900;}
.pd-section p{line-height:1.6;max-width:78ch;margin:0 0 10px;}
.pd-usps{margin:6px 0 12px;padding-left:20px;line-height:1.5;}
.pd-usps li{margin-bottom:4px;}
.pd-desc{max-width:78ch;line-height:1.6;}
.pd-desc p{margin:0 0 10px;}
.pd-desc ul{padding-left:20px;}
.pd-spec{width:100%;border-collapse:collapse;font-size:14px;max-width:720px;}
.pd-spec th,.pd-spec td{padding:9px 10px;border-bottom:1px solid rgba(0,0,0,.08);text-align:left;vertical-align:top;}
.pd-spec th{width:38%;font-weight:600;color:#444;background:#fafafa;}
.pd-fit{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px 24px;}
.pd-fit__make h3{margin:0 0 6px;font-size:15px;}
.pd-fit__make ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
.pd-fit__make li a{display:inline-block;padding:4px 10px;border:1px solid rgba(0,0,0,.15);border-radius:999px;font-size:13px;text-decoration:none;background:#fff;}
.pd-fit__make li a:hover{border-color:#111;}
.pd-pn{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
.pd-pn li{padding:5px 10px;border:1px solid rgba(0,0,0,.15);border-radius:8px;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#fafafa;}

/* Aside */
.pd-aside{position:sticky;top:96px;display:grid;gap:16px;}
.pd-help{padding:18px;border:1px solid rgba(0,0,0,.12);border-radius:14px;background:#fff;}
.pd-help h2{margin:0 0 8px;font-size:17px;font-weight:900;}
.pd-help p{margin:0 0 8px;font-size:14px;line-height:1.5;}
.pd-help__links{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
.pd-help__links a{display:inline-block;padding:5px 10px;border:1px solid rgba(0,0,0,.15);border-radius:999px;font-size:13px;text-decoration:none;}

/* Related */
.pd-related{padding:0;}
.pd-related h2{margin:0 0 14px;font-size:22px;font-weight:900;}
.pd-related .cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;list-style:none;margin:0;padding:0;}

/* Mobile sticky buy bar */
.pd-sticky{position:fixed;left:0;right:0;bottom:0;z-index:900;display:flex;align-items:center;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid rgba(0,0,0,.15);box-shadow:0 -4px 16px rgba(0,0,0,.08);}
.pd-sticky[hidden]{display:none;}
.pd-sticky__price{font-weight:900;font-size:18px;flex:1;}
.pd-sticky__price .agri-vat-suffix{font-size:12px;font-weight:500;}
.pd-sticky__btn{height:46px;padding:0 20px;border:0;border-radius:10px;background:#111;color:var(--y);font-weight:800;font-size:15px;}

@media (max-width:900px){
  .pd-top{grid-template-columns:1fr;gap:20px;}
  .pd-body{grid-template-columns:1fr;gap:24px;}
  .pd-aside{position:static;}
}
@media (max-width:640px){
  .pd{padding:12px 16px 90px;}
  .pd-price__main{font-size:26px;}
  .pd-form form.cart{flex-direction:column;}
  .pd-form .quantity{width:100%;justify-content:space-between;}
  .pd-form .quantity input.qty{flex:1;}
  .pd-spec th{width:44%;}
}
