/*
Theme Name: Electric Generator Depot
Theme URI: https://www.electricgeneratordepot.com/
Author: Migration Team
Description: WooCommerce theme prepared to reproduce the Electric Generator Depot storefront layout.
Version: 0.1.4
Text Domain: egd
*/

:root {
  --egd-red: #cc0000;
  --egd-blue: #1b175d;
  --egd-ink: #171717;
  --egd-muted: #666;
  --egd-border: #e5e5e5;
  --egd-green: #199800;
  --egd-max: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--egd-ink); background: #fff; font-family: Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.5; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { width: min(calc(100% - 32px), var(--egd-max)); margin-inline: auto; }

.announcement-bar { padding: 8px 16px; color: #fff; background: var(--egd-red); text-align: center; font-size: .9rem; font-weight: 700; }
.utility-bar { color: #fff; background: var(--egd-blue); border-bottom: 1px solid rgba(255,255,255,.4); }
.utility-bar__inner { display: flex; justify-content: flex-end; gap: 24px; align-items: center; min-height: 34px; font-size: .82rem; }
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.12); }
.site-header__main { display: grid; grid-template-columns: 190px minmax(280px, 1fr) auto; gap: 28px; align-items: center; min-height: 88px; }
.site-logo img { width: 173px; }
.header-search { display: flex; min-width: 0; }
.header-search input { min-width: 0; flex: 1; padding: 13px 16px; border: 1px solid #bbb; border-right: 0; border-radius: 3px 0 0 3px; font: inherit; }
.header-search button { width: 52px; border: 0; border-radius: 0 3px 3px 0; color: #fff; background: var(--egd-red); cursor: pointer; font-size: 1.1rem; }
.header-actions { display: flex; align-items: center; gap: 18px; white-space: nowrap; font-size: .9rem; }
.header-action { text-decoration: none; }
.header-action:hover { color: var(--egd-red); }
.site-nav { border-top: 1px solid var(--egd-border); }
.site-nav__list { display: flex; align-items: stretch; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-nav__list > li { position: relative; }
.site-nav__list a, .site-nav__toggle { display: block; padding: 13px 17px; border: 0; background: transparent; text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; }
.site-nav__list a:hover, .site-nav__toggle:hover { color: var(--egd-red); }
.site-nav__sub { position: absolute; left: 0; top: 100%; display: none; min-width: 250px; margin: 0; padding: 10px 0; background: #fff; box-shadow: 0 5px 16px rgba(0,0,0,.16); list-style: none; }
.site-nav__list li:hover > .site-nav__sub, .site-nav__list li:focus-within > .site-nav__sub { display: block; }
.site-nav__sub a { padding: 9px 18px; font-weight: 400; }
/* WordPress outputs nested navigation as .sub-menu. */
.site-nav__list .sub-menu { position: absolute; left: 0; top: 100%; z-index: 30; display: none !important; min-width: 250px; margin: 0; padding: 10px 0; border-top: 2px solid var(--egd-red); background: #fff; box-shadow: 0 5px 16px rgba(0,0,0,.16); list-style: none; }
.site-nav__list li:hover > .sub-menu, .site-nav__list li:focus-within > .sub-menu, .site-nav__list li.is-open > .sub-menu { display: block !important; }
.site-nav__list .sub-menu a { padding: 9px 18px; font-size: .94rem; font-weight: 400; white-space: nowrap; }
.site-nav__list > li.menu-item-has-children > a::after { display: inline-block; margin-left: 8px; color: var(--egd-red); content: ">"; font-size: .75em; }
.site-nav__submenu-toggle { display: none; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.6rem; cursor: pointer; }

.hero { position: relative; overflow: hidden; }
.hero__slide { display: none; position: relative; }
.hero__slide.is-active { display: block; }
.hero__image { width: 100%; aspect-ratio: 5 / 1; object-fit: cover; }
.hero__image--mobile { display: none; }
.hero__control { position: absolute; top: 50%; width: 42px; height: 42px; transform: translateY(-50%); border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.45); cursor: pointer; }
.hero__control--prev { left: 18px; }
.hero__control--next { right: 18px; }
.hero__dots { position: absolute; bottom: 14px; left: 50%; display: flex; gap: 7px; transform: translateX(-50%); }
.hero__dot { width: 10px; height: 10px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.hero__dot.is-active { background: #fff; }

.section { padding: 46px 0; }
.section__title { margin: 0 0 24px; text-align: center; font-size: 1.75rem; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { position: relative; min-width: 0; border: 1px solid var(--egd-border); background: #fff; }
.product-card__image { display: grid; place-items: center; aspect-ratio: 1; padding: 14px; background: #fff; }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; }
.product-card__content { padding: 14px 16px 18px; }
.product-card__title { min-height: 3em; margin: 0 0 9px; font-size: 1rem; line-height: 1.35; }
.product-card__price { color: var(--egd-red); font-size: 1.1rem; font-weight: 700; }
.product-card__price del { margin-right: 5px; color: #777; font-size: .9rem; font-weight: 400; }
.section__link { display: inline-block; margin-top: 24px; color: var(--egd-red); font-weight: 700; text-decoration: none; }

.promo-mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 10px; }
.promo-card { position: relative; min-height: 250px; overflow: hidden; color: #fff; background: #222; }
.promo-card::after { position: absolute; inset: 0; background: rgba(0,0,0,.32); content: ""; }
.promo-card img { width: 100%; height: 100%; object-fit: cover; }
.promo-card__content { position: absolute; z-index: 1; inset: auto 18px 18px; text-align: center; }
.promo-card__title { margin: 0 0 12px; font-size: 1.35rem; }
.button { display: inline-block; padding: 10px 18px; border: 0; border-radius: 2px; color: #fff; background: var(--egd-red); font-weight: 700; text-decoration: none; }
.button:hover { background: #a80000; }

.partner-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: center; }
.partner-grid a { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--egd-border); }
.partner-grid img { width: 160px; height: 160px; object-fit: contain; }
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.category-card { position: relative; min-height: 180px; overflow: hidden; color: #fff; background: #222; }
.category-card::after { position: absolute; inset: 0; background: rgba(0,0,0,.28); content: ""; }
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card__content { position: absolute; z-index: 1; inset: auto 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-card__title { margin: 0; font-size: 1.25rem; }

.newsletter { color: #fff; background: var(--egd-blue); }
.newsletter__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.newsletter h2 { margin: 0 0 6px; font-size: 1.7rem; }
.newsletter p { margin: 0; color: rgba(255,255,255,.82); }
.newsletter form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.newsletter input { width: 100%; padding: 12px 13px; border: 0; border-radius: 2px; font: inherit; }
.newsletter input[type=email] { grid-column: 1 / -1; }
.newsletter button { grid-column: 1 / -1; justify-self: start; padding: 11px 24px; border: 0; border-radius: 2px; color: #fff; background: var(--egd-red); font-weight: 700; cursor: pointer; }

.site-footer { padding: 44px 0 20px; color: #fff; background: #202020; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 34px; }
.site-footer h2 { margin: 0 0 12px; font-size: 1.05rem; }
.site-footer p, .site-footer li { color: #d2d2d2; font-size: .92rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; padding-top: 16px; border-top: 1px solid #4a4a4a; color: #c5c5c5; font-size: .84rem; }

.content-area { padding: 46px 0; }
.content-area h1, .content-area h2, .content-area h3 { line-height: 1.2; }
.woocommerce ul.products { margin: 0; }

/* GenInterlock panel compatibility selector, matching the source guide. */
.egd-geninterlock { --gi-yellow: #ffce43; --gi-black: #000; --gi-grey: #e3e3e3; max-width: 1120px; margin: 0 auto; padding: 18px 0 52px; color: #171717; }
.egd-gi-intro { margin: 0 auto 22px; }
.egd-gi-logo { display: block; width: min(600px, 100%); height: auto; margin: 0 auto 18px; }
.egd-gi-intro p { margin: 0 0 16px; line-height: 1.65; }
.egd-gi-step { display: flex; align-items: stretch; min-height: 42px; margin: 28px 0 22px; overflow: hidden; background: var(--gi-black); color: #fff; text-transform: uppercase; font-weight: 500; letter-spacing: .04em; }
.egd-gi-step span { position: relative; display: flex; align-items: center; flex: 0 0 150px; padding: 5px 28px; background: var(--gi-yellow); color: #111; }
.egd-gi-step span::after { position: absolute; z-index: 1; width: 28px; height: 28px; content: ''; right: -14px; top: 7px; transform: rotate(45deg); border-right: 2px solid #fff; border-top: 2px solid #fff; background: var(--gi-yellow); }
.egd-gi-step strong { display: flex; align-items: center; flex: 1; padding: 8px 32px; font-weight: 500; }
.egd-gi-brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
.egd-gi-brand { flex: 0 1 225px; min-height: 104px; padding: 8px; border: 2px solid transparent; background: #fff; color: #111; font: inherit; cursor: pointer; }
.egd-gi-brand img { display: block; width: 100%; height: 68px; object-fit: contain; }
.egd-gi-brand span { display: block; margin-top: 4px; font-size: .82rem; font-weight: 600; }
.egd-gi-brand:hover, .egd-gi-brand[aria-pressed="true"] { border-color: var(--gi-yellow); }
.egd-gi-hint { min-height: 1.5em; margin: 0 0 10px; color: #555; }
.egd-gi-products { display: flex; flex-wrap: wrap; justify-content: center; min-height: 360px; }
.egd-gi-product { flex: 0 1 250px; min-width: 0; margin: 12px; padding: 10px; border: 3px solid var(--gi-grey); display: flex; flex-direction: column; box-sizing: border-box; }
.egd-gi-product[hidden], .egd-gi-empty[hidden] { display: none; }
.egd-gi-product img { width: 100%; height: 190px; object-fit: contain; }
.egd-gi-product-title { margin: 0; line-height: 1.35; font-size: 1rem; font-weight: 700; }
.egd-gi-product-title a { color: inherit; text-decoration: none; }
.egd-gi-product-title a:hover { text-decoration: underline; }
.egd-gi-sku { margin: 2px 0 10px; color: #888; font-size: 14px; }
.egd-gi-price { margin: auto 0 10px; font-weight: 700; }
.egd-gi-cart, .egd-gi-unavailable { display: block; margin-top: auto; padding: 9px 20px; text-align: center; text-transform: uppercase; font-weight: 700; }
.egd-gi-cart { background: #111; color: #fff !important; }
.egd-gi-cart:hover { background: #333; }
.egd-gi-unavailable { background: #eee; color: #666; font-size: 13px; }
.egd-gi-empty, .egd-gi-safety { margin: 16px 0 0; padding: 12px 14px; background: #f4f4f4; line-height: 1.6; }
.egd-gi-safety { font-size: 14px; }
@media (max-width: 600px) {
  .egd-geninterlock { padding: 12px 0 36px; }
  .egd-gi-step { min-height: 58px; }
  .egd-gi-step span { flex-basis: 118px; padding: 5px 18px; }
  .egd-gi-step span::after { top: 15px; }
  .egd-gi-step strong { padding: 9px 18px; font-size: 13px; }
  .egd-gi-brand { flex-basis: 145px; min-height: 88px; }
  .egd-gi-brand img { height: 54px; }
  .egd-gi-product { flex-basis: calc(50% - 12px); margin: 6px; }
}
.egd-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 26px; margin: 0 0 32px; padding: 0 0 18px; border-bottom: 1px solid #d8d8d8; }
.egd-filters__heading { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; min-height: 42px; margin-bottom: 4px; color: #111; }
.egd-filter-clear { color: var(--egd-red); font-size: .85rem; white-space: nowrap; }
.egd-filter-group { min-width: 0; border-top: 1px solid #e3e3e3; }
.egd-filter-group summary { padding: 14px 0 10px; color: #111; cursor: pointer; font-weight: 700; list-style: none; }
.egd-filter-group summary::-webkit-details-marker { display: none; }
.egd-filter-group summary::after { float: right; content: '+'; color: #666; font-size: 1.1rem; font-weight: 400; }
.egd-filter-group[open] summary::after { content: '−'; }
.egd-filter-options { display: grid; gap: 8px; padding: 0 0 16px; }
.egd-filter-option { display: grid; grid-template-columns: 17px 1fr auto; align-items: center; gap: 8px; color: #333; font-size: .9rem; line-height: 1.25; cursor: pointer; }
.egd-filter-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--egd-red); }
.egd-filter-option em { color: #777; font-size: .78rem; font-style: normal; }
.egd-filters__actions { display: flex; align-items: end; grid-column: 1 / -1; min-height: 44px; }
.egd-filter-submit { min-height: 36px; padding: 7px 18px; border: 0; color: #fff; background: var(--egd-red); cursor: pointer; font-weight: 700; }

@media (max-width: 900px) {
  .site-header__main { grid-template-columns: 155px 1fr auto; gap: 14px; }
  .site-logo img { width: 145px; }
  .header-actions { gap: 10px; }
  .site-nav__list a, .site-nav__toggle { padding-inline: 10px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .egd-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
  .promo-mosaic { grid-template-columns: repeat(2, 1fr); }
  .newsletter__inner, .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 719px) {
  .container { width: min(calc(100% - 24px), var(--egd-max)); }
  .utility-bar { display: none; }
  .site-header__main { grid-template-columns: auto 1fr auto; min-height: 68px; }
  .menu-toggle { display: block; }
  .site-logo { justify-self: center; }
  .site-logo img { width: 128px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 10px; }
  .site-header__main { padding-bottom: 10px; }
  .header-actions { gap: 8px; font-size: .78rem; }
  .header-action--login { display: none; }
  .site-nav { display: none; border-top: 1px solid var(--egd-border); }
  .site-nav.is-open { display: block; }
  .site-nav__list { display: block; }
  .site-nav__list a, .site-nav__toggle { width: 100%; padding: 12px 8px; text-align: left; }
  .site-nav__sub { position: static; display: block; padding: 0 0 8px 14px; box-shadow: none; }
  .site-nav__sub a { padding: 7px 8px; }
  .site-nav__list .sub-menu { position: static; display: none !important; min-width: 0; padding: 0 0 8px 14px; border-top: 0; box-shadow: none; }
  .site-nav__list li.is-open > .sub-menu { display: block !important; }
  .site-nav__list .sub-menu a { padding: 7px 8px; white-space: normal; }
  .site-nav__submenu-toggle { display: inline-grid; position: absolute; top: 5px; right: 4px; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; color: var(--egd-red); background: transparent; cursor: pointer; font-size: 1.1rem; }
  .hero__image { display: none; aspect-ratio: 800 / 501; }
  .hero__image--mobile { display: block; }
  .hero__control { width: 34px; height: 34px; }
  .section { padding: 32px 0; }
  .section__title { font-size: 1.45rem; }
  .product-grid { gap: 10px; }
  .egd-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding-bottom: 14px; }
  .egd-filter-submit { grid-column: span 2; }
  .product-card__content { padding: 11px; }
  .product-card__title { font-size: .9rem; }
  .promo-mosaic, .category-grid { grid-template-columns: 1fr; }
  .promo-card { min-height: 210px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .partner-grid img { width: 120px; height: 120px; }
  .newsletter__inner, .newsletter form, .footer-grid { grid-template-columns: 1fr; }
  .newsletter input[type=email], .newsletter button { grid-column: auto; }
  .newsletter button { justify-self: stretch; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: 8px; }
}

/* Product media: clean framed stage, clear zoom affordance and scrollable thumbs. */
.single-product div.product div.images { overflow: hidden; }
.single-product div.product div.images .woocommerce-product-gallery__wrapper { background: #fff; }
.single-product div.product div.images .woocommerce-product-gallery__image {
  display: grid;
  place-items: center;
  min-height: clamp(300px, 42vw, 560px);
  padding: clamp(12px, 2vw, 28px);
  border: 1px solid var(--egd-border);
  border-radius: 8px;
  background: #fff;
}
.single-product div.product div.images .woocommerce-product-gallery__image a { display: grid; place-items: center; width: 100%; height: 100%; cursor: zoom-in; }
.single-product div.product div.images .woocommerce-product-gallery__image img { width: 100%; max-height: 520px; object-fit: contain; }
.single-product div.product div.images .flex-control-thumbs { display: flex; gap: 10px; margin: 12px 0 0; padding: 2px 1px 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.single-product div.product div.images .flex-control-thumbs li { flex: 0 0 76px; float: none; width: 76px; }
.single-product div.product div.images .flex-control-thumbs img { aspect-ratio: 1; padding: 4px; border: 1px solid var(--egd-border); border-radius: 6px; object-fit: contain; opacity: .72; transition: border-color .18s ease, opacity .18s ease, transform .18s ease; }
.single-product div.product div.images .flex-control-thumbs img:hover,
.single-product div.product div.images .flex-control-thumbs img.flex-active { border-color: var(--egd-red); opacity: 1; transform: translateY(-1px); }
.pswp { --pswp-bg: rgba(12, 15, 22, .96); }
.pswp__button { opacity: .9; }
.pswp__counter { font-variant-numeric: tabular-nums; }
@media (max-width: 719px) {
  .single-product div.product div.images .woocommerce-product-gallery__image { min-height: min(78vw, 430px); }
  .single-product div.product div.images .woocommerce-product-gallery__image img { max-height: 76vw; }
  .single-product div.product div.images .flex-control-thumbs li { flex-basis: 64px; width: 64px; }
}
