/* ===========================
   James Delingpole — Shop CSS
   Scope to .wrap-shop to avoid bleed
   =========================== */

:root{
  --card-min: 210px; /* minimum card width */
  --card-max: 300px; /* cap so singles don’t blow up (↓ from 300) */
}

/* Section pills = breadcrumb-like, no arrows */
.section-menu-nav { margin: 10px 0 10px 20px; }
.section-menu-nav .crumb-list{
  display:flex; gap:10px; flex-wrap:wrap; list-style:none; margin:0; padding:0;
}
.section-menu-nav .crumb-item .crumb{ margin:0 0 10px; }
.section-menu-nav .crumb a{
  text-decoration:none; 
  color: var(--jd-cream);
  padding: 5px;
  display:inline-block;
  line-height: 1;
}
.section-menu-nav .crumb a:hover{
  background: var(--jd-nearly-blk);
  color: var(--jd-mustard);
}
.section-menu-nav .crumb-item.is-active .crumb a{
  background: var(--jd-cream);
  color: var(--jd-nearly-blk);
}

/* Search results bar */
.results-bar{ margin: 20px 20px; }
.results-bar h3 { color: var(--jd-mustard); text-align: center;}


/* Layout shell */
.wrap-shop { margin: 20px 20px 60px; }

/* Section headings */
.wrap-shop .shop-head{
  margin: 20px 0 10px;
  text-align: center;
  position: relative;
}
.wrap-shop .shop-head h2{ margin:0; }

/* Grid */

.grid.grid-4,
.shop-grid{
  display: grid;
  gap: 20px;
  /* Fixed-width tracks: add as many as fit, each between min/max */
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min), var(--card-max)));
  justify-content: start;     /* ⬅ left-align 1s and 2s */
	margin: 20px 0;
}

.shop-body {
	margin: 10px 0 0;
}

/* Cards (match your markup) */
.wrap-shop .shop-card{
  position: relative;
  overflow: hidden;
}

.wrap-shop .shop-card.no-thumb{ background: transparent; }

/* Whole card clickable */
.wrap-shop .shop-link{
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Media wrapper keeps image size sensible */
/* Media wrapper keeps image size sensible (fixed 16:9 for all) */
.shop-media{
  width: 100%;
  aspect-ratio: 16 / 9;     /* ← fixed 16:9 */
  background:#0b0c0d;
  overflow:hidden;
}

/* Image inside the wrapper */
.shop-media .thumb,
.shop-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit: cover;         /* fill the 16:9 box without distortion */
  opacity:.6;
  transform: scale(1);
  transform-origin:center;
  transition: transform var(--cine-zoom-duration,18s) linear, opacity .8s ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* Hover */
.shop-card:hover .shop-media .thumb,
.shop-card:focus-within .shop-media .thumb,
.shop-card:hover .shop-media img,
.shop-card:focus-within .shop-media img{
  opacity:1;
  transform: scale(var(--cine-zoom-scale,1.06));
}


/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .shop-media .thumb,
  .shop-media img{
    transition: opacity 200ms linear;
    transform: none;
  }
  .shop-card:hover .shop-media .thumb,
  .shop-card:focus-within .shop-media .thumb{
    transform: none;
  }
}

/* Mobile tweak */
@media (max-width: 640px){
  .grid.grid-4,
  .shop-grid{ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .shop-media .thumb,
  .shop-media img{ opacity: .85; }
}

/* Card positioning hooks */
.shop-card{ position:relative; }


/* Optional post-event overlay (click-through) */
.watch-overlay{
  position:absolute; inset:auto 10px 10px auto; /* bottom-right by default */
  z-index:2;
  background: var(--jd-nearly-blk,#151D0A);
  color: var(--jd-cream,#F8EDC2);
  border:1px solid var(--jd-cream,#F8EDC2);
  padding:8px 12px;
  font-size:12px; line-height:1;
  border-radius: 999px;
  opacity:.95;
  pointer-events:none; /* anchor remains clickable */
}



.shop-section.is-hidden { display: none; }









.product-wrap{
	max-width:1200px;
	margin:20px auto;
	padding:0 20px;
	/* background: #333;
	 color:var(--jd-cream,#F8EDC2);*/
}

.product-grid{
	display:grid;
	grid-template-columns:1fr;
	gap:20px;
}

/* if product-grid is wider than 900px */
@media(min-width:900px){ 
	.product-grid{ grid-template-columns:1fr 1fr; } 
}

/* Product images gallery */

.product-gallery{
	position:relative;
}

.product-gallery .main{ display:block; width:100%; height:auto; }

    .thumbs{display:flex;gap:10px;flex-wrap:wrap;padding:10px 0}

    .thumbs img{width:120px;height:auto;border:1px solid var(--jd-cream,#F8EDC2);cursor:pointer}

.thumbs img.current{ outline:2px solid var(--jd-mustard,#f6a921); outline-offset:2px; }



/* Product information */

.product-info { margin: 0; }

.product-quote { margin: 10px 0; }

.product-desc { margin: 10px 0 20px; }

.lh { line-height: 1.4; padding-right: 20%; }

    .product-info .sub{ }

    .product-info .price{ }

.product-info h1,
.product-info h2,
.product-info h3
.product-info h4 {
	line-height: 1;
	margin: 0;
}



    .product-desc{ }

/* Product information list */

.pi-list{ 
	list-style:none; 
	margin:0 0 12px; 
	padding:0; 
	/* border-top: 1px dashed color-mix(in srgb, var(--jd-cream) 50%, transparent); */
}

.product-info-row { 
	display:grid; 
	grid-template-columns: 160px 1fr; 
	gap: 10px 20px; 
	padding: 10px 0; 
	border-top: 1px dashed color-mix(in srgb, var(--jd-cream) 50%, transparent);
}

.pi-label{ opacity:.75; }
.pi-val{ }

@media (max-width:600px){
  .product-info-row { grid-template-columns: 1fr; }
}

/* Purchase options */
.purchase-options{ margin:12px 0 20px; }
.purchase-heading{ margin:.2em 0 .6em; font-size:18px; }

.buy-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
@media (min-width:700px){
  .buy-grid{ grid-template-columns:repeat(1,minmax(0,1fr)); }
}
@media (min-width:1000px){
  .buy-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* One-liner that auto-fits up to 4 cols with a 240px min 
.buy-grid{ display:grid; gap:14px; grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); }
@media (min-width:1200px){
  .buy-grid{ grid-template-columns:repeat(4, minmax(240px,1fr)); }
}*/

.buy-card{
  border:1px dashed color-mix(in srgb, var(--jd-cream) 50%, transparent);
  padding:10px;
  background:transparent;
}
.buy-label{ margin: 0 0 10px;  }
.buy-price{ margin: .2em 0 .4em; }
.buy-blurb{ margin: .2em 0 .8em; opacity:.8; }
.buy-btn{ display:inline-block; margin-top:.2em; }

.purchase-note{
  padding:10px 12px;
  line-height:1.1;
  display:block;                 /* keep whole block clickable */
  text-decoration:none;
  color:inherit;

  border:1px dashed;             /* 50% opacity of jd-red */
  border-color: color-mix(in srgb, var(--jd-red, #e6462d) 50%, transparent);
  cursor:pointer;

  /* smoothness */
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

@supports not (color: color-mix(in srgb, white, black)) {
  /* Fallback that matches jd-red at 50% alpha */
  .purchase-note{ border-color: rgba(230,70,45,.5); }
}

.purchase-note h4{
  margin:0;
  color: var(--jd-red, #e6462d);
  transition: color .2s ease;
}

/* Hover + keyboard focus state */
.purchase-note:hover,
.purchase-note:focus-visible{
  background: var(--jd-red, #e6462d);
  color: var(--jd-nearly-blk, #151D0A);
  outline: 2px solid var(--jd-olive, #3f4a3c);
  outline-offset: 2px;
}

/* Make the H4 switch to nearly-black too */
.purchase-note:hover h4,
.purchase-note:focus-visible h4{
  color: var(--jd-nearly-blk, #151D0A);
}



.product-gallery .product-video {  }

.embed-16x9 { position: relative; width: 100%; padding-top: 56.25%; } /* 16:9 */
.embed-16x9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* optional */
#purchase { scroll-margin-top: 80px; } /* adjust to your header height */

/* Small spacing for the inline button */
.buy-now-inline{
  display:inline-block;
  margin:20px 0 10px;
  padding:10px;
  border:1px dashed color-mix(in srgb, var(--jd-cream) 50%, transparent);
  background:transparent;
}

/* ───────── Corner ribbon badge (top-right, 45°) ───────── */
:root{
  --badge-font: var(--font-display, system-ui, sans-serif);
  --badge-size: var(--h4, 18px);
  --badge-bg: var(--jd-nearly-blk, #151D0A);
  --badge-fg: var(--jd-cream, #F8EDC2);
  --badge-hover: var(--jd-mustard, #f6a921);

  /* tweak these if you need a longer/shorter ribbon */
  --badge-width: 220px;     /* visual length of the visible strip */
  --badge-pad-y: 6px;
}

/* ensure the card can host absolutely positioned badges */
.wrap-shop .shop-card { position: relative; overflow: hidden; }

/* base ribbon */
.corner-badge{
  position: absolute;
  top: 110px; right: 30px;
  z-index: 5;

  display: inline-block;
  width: var(--badge-width);
  text-align: center;

  /* rotate the whole thing (bg + text) by 45° and push into the corner */
  transform: translate(38%,-38%) rotate(45deg);
  transform-origin: top right;

  font-family: var(--badge-font);
  font-size: 8px;
	text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--jd-cream);
  background: var(--jd-nearly-blk);
  padding: 5px;

  box-shadow: 0 2px 0 rgba(0,0,0,.05);
  pointer-events: none; /* keep the whole card clickable */
}

/* Extend the ribbon past the visible box so it looks continuous */
.corner-badge::before,
.corner-badge::after{
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1200px;             /* big to cover all cases */
  background: inherit;
}
.corner-badge::before{ right: 100%; }
.corner-badge::after { left: 100%; }

/* variants (you can theme per-status if desired) */
.corner-badge--stock  { background: var(--badge-bg); color: var(--badge-fg); }
.corner-badge--sold   { background: var(--badge-bg); color: var(--badge-fg);  letter-spacing: .08em; }
.corner-badge--watch  { background: var(--badge-bg); color: var(--badge-fg); }

/* subtle hover colour shift to match your language */
.shop-card:hover .corner-badge,
.shop-card:focus-within .corner-badge{
  color: var(--badge-hover);
}

/* optional: hide old overlays if left in DOM */
.sold-out-overlay,
.badge-stock,
.watch-overlay{ display: none !important; }

/* Product page can reuse the exact same badge */
.product-wrap .corner-badge{ /* inherits all */ }

/* Base card text colour (so inheritance is predictable) */
.wrap-shop .shop-card { color: var(--jd-cream); }

/* Smooth colour transition on key text bits */
.wrap-shop .shop-card .shop-title,
.wrap-shop .shop-card .shop-sub,
.wrap-shop .shop-card .shop-price,
.wrap-shop .shop-card .shop-body { transition: color .25s ease; }

/* Make the whole card’s text go mustard on hover/focus */
.wrap-shop .shop-card:hover,
.wrap-shop .shop-card:focus-within { color: var(--jd-mustard); }

/* If any descendants have their own colour set elsewhere, force it here */
.wrap-shop .shop-card:hover .shop-title,
.wrap-shop .shop-card:hover .shop-sub,
.wrap-shop .shop-card:hover .shop-price,
.wrap-shop .shop-card:hover .shop-body { color: var(--jd-mustard); }

/* (Optional) ensure the link itself follows the colour */
.wrap-shop .shop-card:hover .shop-link { color: var(--jd-mustard); }





/* Product - Basket - Checkout */

/* Row layout */
.qty-row{
  display:flex;
  gap:10px;
  align-items:flex-end;   /* align with mini buttons */
  margin-top:12px;
  flex-wrap:wrap;         /* wrap nicely on small screens */
}

/* Label + input stack */
.qty-wrap{
  display:flex;
  flex-direction:column;
  gap:5px;
}

/* Small “Qty” label */
.qty-label{
  font-family: var(--font-display);
  font-size: var(--h4);
  color: var(--jd-olive);
  font-style: normal;
	text-transform: uppercase;
}


.qty-row{ 
	display:flex; gap:10px; 
	align-items:center; 
	flex-wrap:wrap; 
	margin-top:12px; 
}



.qty-actions{
  flex-basis:100%;        /* forces a new row */
  display:flex;
  gap:10px;
  margin-top:8px;         /* little spacing under the input */
}


/* Qty input styled like breadcrumb search */
.qty-input{
  /* size: narrow numeric field */
  width: 8ch;
  max-width: 10ch;
  min-width: 6ch;

  background: transparent;
  color: var(--jd-cream);
  border: 1px solid var(--jd-olive);
  border-radius: 20px;
  padding: 10px 15px;

  /* p1 typography */
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  text-transform: none;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeSpeed;
  caret-color: var(--jd-mustard);

  /* number input normalization */
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Focus state to match cream accent */
.qty-input:focus{
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--jd-cream) 30%, transparent);
}

/* Hide WebKit spinners */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button{
  -webkit-appearance: none; margin:0;
}



/* ── Narrow column (660px) ───────────────────────────────── */
.shop-centre {
  max-width: 680px;
  margin: 0 auto;
	padding: 0 20px;
}

/* ── Table tweaks ────────────────────────────────────────── */
.basket-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
/* .basket-table th, */
.basket-table td {
  padding: 10px;
    border-bottom:1px dashed color-mix(in srgb, var(--jd-cream) 20%, transparent); 
  background:transparent;
}
.basket-table thead th {
  font-weight: 600;
  text-align: left;
}
.basket-table .num { text-align: right; white-space: nowrap; }
.basket-table .tright { text-align: right; }

/* keep qty cell compact */
.qty-cell { width: 1%; white-space: nowrap; }



/* Optional: “cream” select to pair with qty input */
.select-james{
  background: transparent;
  color: var(--jd-cream);
  border: 1px solid var(--jd-olive);
  border-radius: 20px;
  padding: 10px;
  /* p1 typography */
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 14px;

  /* kill the shiny/native styling */
  appearance: none;             /* standard */
  -webkit-appearance: none;     /* Safari/Chrome */
  -moz-appearance: none;        /* Firefox */
  background-image: none;       /* some UAs add gradients */
  box-shadow: none;             /* remove inner glow/shadow */
  background-clip: padding-box; /* avoid weird highlights */
	margin-top: 10px;
}

.select-james:focus{
  outline: none;
  /* subtle focus ring that fits your palette (optional) */
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--jd-cream) 25%, transparent);
}

/* Hide the IE/Edge legacy arrow (harmless elsewhere) */
.select-james::-ms-expand { display: none; }



/* Ship row wrapper spacing */
.ship-wrap { display: inline-block; text-align: left; }


.basket-actions{
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}


/* container */
.product-policies{
  display: grid;
  gap: 0 40px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  grid-template-columns: 1fr;         /* 1 column on mobile */
}

@media (min-width: 641px){
  .product-policies{
    grid-template-columns: repeat(2, minmax(0, 1fr));  /* 2 cols => 2×2 */
  }
}

/* items */
.policy-section{
  padding: 20px;
  box-sizing: border-box;
  /* Drop hard widths so grid can size evenly */
  width: auto;
  max-width: none;
}

/* Archive section treatment */
.shop-section--archive .shop-media .thumb{
  filter: grayscale(100%);
  opacity: .5;
  transition: filter .2s ease, opacity .2s ease;
}

.shop-section--archive a.shop-link:hover .shop-media .thumb{
  filter: none;
  opacity: 1;
}

/* Hide price on Archive cards only */
.wrap-shop .shop-section--archive .shop-price{
  display: none;
}


