
:root{
  --blue:#0963d8; --blue-dark:#00397f; --navy:#071b3b; --ink:#0b1d3a; --muted:#6c7890;
  --bg:#f6f8fc; --line:#dfe6f0; --card:#fff; --success:#0b8a53;
}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;font-family:Inter,Arial,sans-serif;color:var(--ink);background:white}
button,input,select,textarea{font:inherit} button,a{transition:.2s ease} button{cursor:pointer}
.topbar{height:38px;background:linear-gradient(90deg,var(--blue-dark),var(--blue));color:#fff;display:flex;align-items:center;gap:34px;padding:0 3.4%;font-size:13px}.topbar-right{margin-left:auto}.topbar span{opacity:.45;margin:0 8px}
.header{display:grid;grid-template-columns:360px minmax(340px,1fr) 300px;gap:25px;align-items:center;padding:18px 3.4%;background:white}.brand img{width:320px;height:76px;object-fit:contain;object-position:left center}
.search-wrap{display:flex;height:52px;border:1px solid var(--line);border-radius:8px;overflow:hidden;box-shadow:0 6px 20px rgba(0,28,65,.05)}.search-wrap input{border:0;outline:0;padding:0 18px;flex:1;font-size:15px}.search-wrap button{width:64px;border:0;background:var(--blue);color:#fff;font-size:28px}
.header-actions{display:flex;justify-content:flex-end;gap:12px}.icon-btn,.cart-button{border:0;background:#fff;color:var(--ink);padding:12px 14px;border-radius:9px}.icon-btn:hover,.cart-button:hover{background:#f0f5ff}.cart-button{position:relative}.cart-button strong{background:var(--blue);color:white;border-radius:999px;min-width:21px;height:21px;display:inline-grid;place-items:center;font-size:11px;margin-left:5px}
.nav{display:flex;gap:8px;align-items:center;padding:0 3.4% 14px;border-bottom:1px solid var(--line)}.nav a,.nav button{border:0;background:white;text-decoration:none;color:var(--ink);padding:12px 22px;border-radius:8px;font-weight:600;font-size:14px}.nav a:hover{background:#f0f5ff}.nav-primary{background:var(--blue)!important;color:#fff!important}
.hero{min-height:330px;padding:56px 4%;color:white;display:grid;grid-template-columns:1.25fr .9fr;gap:60px;align-items:center;background:radial-gradient(circle at 73% 45%,rgba(40,145,255,.26),transparent 24%),linear-gradient(120deg,#061a3b,#04377d 55%,#071b3b);position:relative;overflow:hidden}.hero:after{content:"";position:absolute;right:-120px;top:-200px;width:580px;height:580px;border:80px solid rgba(255,255,255,.025);transform:rotate(28deg)}
.eyebrow{font-size:12px;letter-spacing:.16em;font-weight:800;margin:0 0 12px}.eyebrow.blue{color:var(--blue)}.hero h1{font-size:52px;line-height:1.05;margin:0 0 18px;max-width:680px}.hero p{max-width:670px;line-height:1.7;color:#dce8ff}.hero-actions{display:flex;gap:12px;margin-top:24px}.btn{border:0;border-radius:8px;padding:13px 20px;font-weight:700}.btn-light{background:white;color:var(--blue-dark)}.btn-ghost{background:transparent;border:1px solid rgba(255,255,255,.45);color:white}.btn-primary{background:var(--blue);color:white}.btn-secondary{background:#edf4ff;color:var(--blue-dark)}.full{width:100%}
.hero-points{display:grid;gap:16px;position:relative;z-index:1}.hero-points div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.13);padding:18px 20px;border-radius:12px;backdrop-filter:blur(4px)}.hero-points b,.hero-points span{display:block}.hero-points span{margin-top:5px;color:#dbe7f7;font-size:13px}
main{background:var(--bg)}.category-section,.catalogue-section,.content-strip{max-width:1500px;margin:auto}.category-section{padding:54px 3.4% 26px}.section-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}.section-title h2,.products-top h2,.content-strip h2,.contact-section h2{font-size:32px;margin:0}.text-btn{border:0;background:transparent;color:var(--blue);font-weight:700}
.category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.category-card{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden;cursor:pointer;box-shadow:0 5px 18px rgba(17,47,90,.04)}.category-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(17,47,90,.09)}.category-card img{width:100%;height:165px;object-fit:contain;background:white;padding:10px}.category-card-body{padding:16px}.category-card h3{margin:0 0 6px;font-size:16px;text-transform:uppercase}.category-card p{margin:0;color:var(--muted);font-size:13px}
.catalogue-section{padding:28px 3.4% 64px;display:grid;grid-template-columns:250px 1fr;gap:26px}.filters{position:sticky;top:12px;align-self:start;background:white;border:1px solid var(--line);border-radius:12px;padding:20px}.filter-head{display:flex;justify-content:space-between;align-items:center}.filter-head h3{margin:0}.filter-head button{border:0;background:transparent;color:var(--blue)}.filters label{display:block;font-size:13px;font-weight:700;margin-top:20px}.filters select{width:100%;padding:11px;margin-top:7px;border:1px solid var(--line);border-radius:7px;background:white}.filters .check{display:flex;gap:8px;align-items:center;font-weight:600}.filter-note{font-size:12px;line-height:1.5;color:var(--muted);margin-top:22px;padding:12px;background:#f7f9fd;border-radius:8px}
.products-panel{min-width:0}.products-top{display:flex;justify-content:space-between;align-items:end;margin-bottom:18px}.products-top p{margin:6px 0 0;color:var(--muted)}.admin-link{border:1px solid var(--line);background:white;border-radius:8px;padding:10px 13px;color:var(--blue-dark);font-weight:700}.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.product-card{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 5px 18px rgba(17,47,90,.035)}.product-image{height:180px;position:relative;display:grid;place-items:center;background:#fff}.product-image img{width:100%;height:100%;object-fit:contain;padding:12px}.badge{position:absolute;left:12px;top:12px;background:#eaf3ff;color:var(--blue-dark);font-size:10px;font-weight:800;padding:6px 8px;border-radius:999px}.product-info{padding:15px;display:flex;flex:1;flex-direction:column}.product-brand{color:var(--blue);font-weight:800;font-size:11px;text-transform:uppercase}.product-info h3{font-size:15px;line-height:1.35;margin:7px 0 5px}.pack{font-size:12px;color:var(--muted)}.price-row{display:flex;justify-content:space-between;align-items:end;margin-top:auto;padding-top:14px}.price{font-size:20px;font-weight:800}.stock{font-size:11px;color:var(--success);font-weight:700}.product-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}.add-btn{border:0;background:var(--blue);color:white;border-radius:7px;padding:11px;font-weight:700}.quick-btn{border:1px solid var(--line);background:white;border-radius:7px;padding:10px 12px}
.features{max-width:1430px;margin:0 auto 30px;padding:18px 28px;border:1px solid var(--line);border-radius:12px;background:#eef5ff;display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.features div{display:grid;grid-template-columns:38px 1fr;grid-template-rows:auto auto}.features span{grid-row:1/3;display:grid;place-items:center;color:var(--blue);font-size:22px}.features b{font-size:13px}.features small{color:var(--muted);margin-top:4px}
.content-strip{padding:70px 4%;background:white;border-top:1px solid var(--line)}.content-strip.alt{background:#eef5ff}.content-strip p{max-width:850px;line-height:1.7;color:var(--muted)}.content-strip code,footer code{background:#eef1f7;padding:2px 5px;border-radius:4px}
.contact-section{background:var(--navy);color:white;padding:65px 5%;display:grid;grid-template-columns:1fr 1fr;gap:50px}.contact-section p{color:#c7d4e8;line-height:1.6}.contact-section form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.contact-section input,.contact-section textarea{border:1px solid #294466;background:#0c274f;color:white;padding:13px;border-radius:7px}.contact-section textarea{grid-column:1/-1;min-height:110px}.contact-section button{grid-column:1/-1}
footer{background:#04132d;color:#d5dfef;padding:45px 4%;display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:30px;font-size:13px}footer img{width:220px;height:70px;object-fit:contain;background:white;border-radius:6px}footer b,footer a,footer span{display:block;margin-bottom:9px}footer a{color:#d5dfef;text-decoration:none}.footer-brand p{font-family:"Playfair Display",serif;font-size:20px;color:white}
.drawer-backdrop{position:fixed;inset:0;background:rgba(0,10,30,.48);z-index:50;opacity:0;pointer-events:none}.drawer-backdrop.open{opacity:1;pointer-events:auto}.drawer{position:fixed;z-index:60;right:0;top:0;width:min(430px,92vw);height:100vh;background:white;transform:translateX(105%);transition:.25s;padding:22px;display:flex;flex-direction:column}.drawer.open{transform:translateX(0)}.drawer-head{display:flex;justify-content:space-between;align-items:center}.close-btn{border:0;background:#eef3fa;width:34px;height:34px;border-radius:50%;font-size:22px}.cart-line{display:grid;grid-template-columns:1fr auto;gap:8px;padding:15px 0;border-bottom:1px solid var(--line)}.cart-line small{display:block;color:var(--muted);margin-top:4px}.cart-controls{display:flex;gap:6px;align-items:center}.cart-controls button{border:1px solid var(--line);background:white;width:29px;height:29px;border-radius:6px}.cart-total{display:flex;justify-content:space-between;font-size:20px;padding:20px 0;margin-top:auto}
.modal-wrap{position:fixed;inset:0;background:rgba(0,10,30,.55);z-index:70;display:none;place-items:center;padding:20px}.modal-wrap.open{display:grid}.modal{width:min(860px,96vw);max-height:92vh;overflow:auto;background:white;border-radius:14px;padding:26px;position:relative}.modal-close{position:absolute;right:18px;top:18px}.modal-product{display:grid;grid-template-columns:1fr 1fr;gap:28px}.modal-product img{width:100%;height:350px;object-fit:contain;border:1px solid var(--line);border-radius:10px}.modal-product h2{font-size:30px;margin:9px 0}.muted{color:var(--muted);line-height:1.6}.checkout-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.checkout-form input,.checkout-form textarea{padding:12px;border:1px solid var(--line);border-radius:7px}.checkout-form textarea{grid-column:1/-1;min-height:110px}.checkout-form button{grid-column:1/-1}
.admin-modal{width:min(1200px,97vw)}.admin-title{display:flex;justify-content:space-between;align-items:center;gap:20px}.admin-title>div:last-child{display:flex;gap:8px}.file-btn input{display:none}.admin-table{width:100%;border-collapse:collapse;font-size:12px}.admin-table th,.admin-table td{border-bottom:1px solid var(--line);padding:8px;text-align:left}.admin-table input{width:100%;padding:7px;border:1px solid var(--line);border-radius:5px}.admin-table .tiny{width:70px}.admin-table button{border:0;background:#ffedf0;color:#9e1733;padding:7px 9px;border-radius:5px}.admin-add{margin:15px 0}.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);background:var(--navy);color:white;padding:12px 18px;border-radius:999px;z-index:100;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1100px){.header{grid-template-columns:250px 1fr}.brand img{width:240px}.header-actions{grid-column:2;justify-content:flex-end}.category-grid,.product-grid{grid-template-columns:repeat(3,1fr)}.hero{grid-template-columns:1fr}.hero-points{grid-template-columns:repeat(3,1fr)}}
@media(max-width:800px){.topbar{overflow:hidden;white-space:nowrap}.topbar>div:nth-child(2),.topbar>div:nth-child(3),.topbar-right{display:none}.header{grid-template-columns:1fr auto;padding:10px 4%}.brand img{width:210px;height:62px}.search-wrap{grid-column:1/-1;grid-row:2}.header-actions .icon-btn{display:none}.nav{overflow-x:auto}.hero{padding:44px 5%;min-height:auto}.hero h1{font-size:38px}.hero-points{grid-template-columns:1fr}.category-grid{grid-template-columns:repeat(2,1fr)}.catalogue-section{grid-template-columns:1fr}.filters{position:static}.product-grid{grid-template-columns:repeat(2,1fr)}.features{grid-template-columns:1fr 1fr;margin:15px}.contact-section,footer{grid-template-columns:1fr}.modal-product{grid-template-columns:1fr}.admin-title{align-items:flex-start;flex-direction:column}.admin-table{min-width:900px}.admin-modal{overflow:auto}.checkout-form{grid-template-columns:1fr}.checkout-form textarea,.checkout-form button{grid-column:auto}}
@media(max-width:520px){.category-grid,.product-grid,.features{grid-template-columns:1fr}.category-card img{height:180px}.products-top{align-items:flex-start;gap:16px;flex-direction:column}.hero h1{font-size:34px}.header-actions span{display:none}}


/* =========================================================
   PRODUCT IMAGE LAYOUT FIX
   Every remote/local packshot is confined to a reserved area.
   This prevents tall/wide images from covering product details.
   ========================================================= */
.product-card{
  position:relative;
  min-width:0;
  height:100%;
  overflow:hidden;
  isolation:isolate;
}

.product-image{
  position:relative !important;
  width:100% !important;
  height:240px !important;
  min-height:240px !important;
  max-height:240px !important;
  flex:0 0 240px !important;
  overflow:hidden !important;
  display:block !important;
  background:#fff;
  padding:0 !important;
}

.product-image img{
  position:absolute !important;
  top:50% !important;
  left:50% !important;
  right:auto !important;
  bottom:auto !important;
  transform:translate(-50%,-50%) !important;
  display:block !important;
  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:calc(100% - 34px) !important;
  max-height:calc(100% - 34px) !important;
  object-fit:contain !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

.product-image .badge{
  position:absolute !important;
  z-index:4 !important;
  top:12px !important;
  left:12px !important;
}

.product-info{
  position:relative !important;
  z-index:5 !important;
  width:100% !important;
  min-width:0 !important;
  flex:1 1 auto !important;
  background:#fff !important;
  padding:15px !important;
  border-top:1px solid #eef2f7;
}

.product-brand,
.product-info h3,
.product-info .pack,
.price-row,
.product-actions{
  position:relative;
  z-index:6;
}

.product-info h3{
  min-height:2.7em;
  overflow-wrap:anywhere;
}

.product-info .pack,
.product-brand{
  overflow-wrap:anywhere;
}

.product-grid{
  align-items:stretch;
}

.modal-product > img{
  display:block !important;
  width:100% !important;
  height:360px !important;
  max-height:360px !important;
  object-fit:contain !important;
  object-position:center !important;
  padding:24px !important;
  background:#fff !important;
  overflow:hidden !important;
}

/* Medium screens */
@media(max-width:800px){
  .product-image{
    height:220px !important;
    min-height:220px !important;
    max-height:220px !important;
    flex-basis:220px !important;
  }
}

/* Phones: give packshots a square-ish area while keeping text separate */
@media(max-width:520px){
  .product-image{
    height:260px !important;
    min-height:260px !important;
    max-height:260px !important;
    flex-basis:260px !important;
  }
  .product-image img{
    max-width:calc(100% - 40px) !important;
    max-height:calc(100% - 40px) !important;
  }
}

/* Missing/slow image resilience */
.product-image{
  background:
    linear-gradient(135deg,rgba(9,99,216,.025),rgba(7,27,59,.015)),
    #fff !important;
}
.product-image img{
  color:transparent;
}

/* Footer branding update */
.footer-brand{
  display:flex;
  align-items:flex-start;
}
footer .footer-brand img{
  width:128px !important;
  height:128px !important;
  object-fit:contain !important;
  object-position:center !important;
  background:#fff !important;
  padding:12px !important;
  border-radius:14px !important;
}
footer .footer-brand p{
  display:none !important;
}


/* Exact user-supplied footer logo */
footer .footer-brand{
  display:flex !important;
  align-items:flex-start !important;
}
footer .footer-brand img{
  display:block !important;
  width:145px !important;
  height:175px !important;
  object-fit:contain !important;
  object-position:center !important;
  background:transparent !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  mix-blend-mode:screen;
}
footer .footer-brand p{
  display:none !important;
}
@media(max-width:800px){
  footer .footer-brand img{
    width:120px !important;
    height:145px !important;
  }
}


/* Exact user-supplied full Esso Online Ltd logo in header */
.header .brand{
  display:flex !important;
  align-items:center !important;
  min-width:260px;
  overflow:hidden;
}
.header .brand img{
  display:block !important;
  width:270px !important;
  height:92px !important;
  max-width:100% !important;
  object-fit:contain !important;
  object-position:left center !important;
  background:transparent !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
@media(max-width:900px){
  .header .brand{
    min-width:190px;
  }
  .header .brand img{
    width:205px !important;
    height:74px !important;
  }
}
@media(max-width:600px){
  .header .brand{
    min-width:150px;
  }
  .header .brand img{
    width:165px !important;
    height:62px !important;
  }
}


/* Larger header branding */
.header{
  min-height:138px !important;
}
.header .brand{
  min-width:390px !important;
  flex:0 0 390px !important;
}
.header .brand img{
  width:385px !important;
  height:125px !important;
  max-width:none !important;
  object-fit:contain !important;
  object-position:left center !important;
}

@media(max-width:1050px){
  .header{
    min-height:112px !important;
  }
  .header .brand{
    min-width:300px !important;
    flex-basis:300px !important;
  }
  .header .brand img{
    width:295px !important;
    height:100px !important;
  }
}
@media(max-width:700px){
  .header{
    min-height:92px !important;
  }
  .header .brand{
    min-width:220px !important;
    flex-basis:220px !important;
  }
  .header .brand img{
    width:215px !important;
    height:78px !important;
  }
}


/* Extra-large header logo */
.header{
  min-height:175px !important;
  padding-top:14px !important;
  padding-bottom:14px !important;
}
.header .brand{
  min-width:520px !important;
  flex:0 0 520px !important;
}
.header .brand img{
  width:510px !important;
  height:155px !important;
  max-width:none !important;
  object-fit:contain !important;
  object-position:left center !important;
}

@media(max-width:1200px){
  .header{
    min-height:145px !important;
  }
  .header .brand{
    min-width:400px !important;
    flex-basis:400px !important;
  }
  .header .brand img{
    width:395px !important;
    height:125px !important;
  }
}
@media(max-width:800px){
  .header{
    min-height:112px !important;
  }
  .header .brand{
    min-width:275px !important;
    flex-basis:275px !important;
  }
  .header .brand img{
    width:270px !important;
    height:92px !important;
  }
}
@media(max-width:520px){
  .header .brand{
    min-width:225px !important;
    flex-basis:225px !important;
  }
  .header .brand img{
    width:220px !important;
    height:82px !important;
  }
}

/* Integrated editor controls */
.site-admin-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.site-admin-actions a{text-decoration:none}.admin-link{white-space:nowrap}
body{background:var(--site-background,#fff);color:var(--site-text,#172033)}
.hero{background-color:var(--site-primary,#003478)}
.btn-primary,.add-btn{background-color:var(--site-accent,#0066b3)}
