/*
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.0
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; }
.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; }

@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)); }
  .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; }
  .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; }
  .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; }
}
