/*
Theme Name: Mama's Goodies Market
Theme URI: https://mamasgoodieshanover.com/
Author: OpenAI
Description: A fast, WooCommerce-first marketplace theme inspired by large retail sites while keeping Mama's Goodies branding.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mamas-goodies-market
*/

:root{
  --mg-bg:#f7f1e8;
  --mg-surface:#ffffff;
  --mg-ink:#171717;
  --mg-muted:#6b7280;
  --mg-teal:#2f8f8b;
  --mg-teal-dark:#173f3d;
  --mg-nav:#234d4b;
  --mg-orange:#f5a24a;
  --mg-border:#e5e0d8;
  --mg-shadow:0 10px 30px rgba(0,0,0,.08);
  --mg-radius:14px;
  --mg-max:1600px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--mg-bg);color:var(--mg-ink);line-height:1.45}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
.mg-container{width:min(var(--mg-max),calc(100% - 40px));margin-inline:auto}
.mg-topbar{background:#173b3a;color:#fff;font-size:12px;padding:5px 0;text-align:center;font-weight:700;letter-spacing:.01em}
.mg-header{background:rgba(255,255,255,.98);border-bottom:1px solid var(--mg-border);position:sticky;top:0;z-index:40;backdrop-filter:blur(8px)}
.mg-header-main{display:grid;grid-template-columns:auto minmax(340px,1fr) auto;gap:20px;align-items:center;padding:12px 0}
.mg-brand{font-weight:950;font-size:28px;letter-spacing:-1px;white-space:nowrap}
.mg-brand img{max-height:52px;width:auto}
.mg-search form{display:flex;border:2px solid #cfd4d7;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.04)}
.mg-search input[type=search]{border:0;outline:0;padding:12px 16px;width:100%;font-size:15px;background:transparent}
.mg-search button{border:0;background:var(--mg-teal);color:#fff;padding:0 26px;font-weight:900;cursor:pointer}
.mg-search button:hover{background:var(--mg-teal-dark)}
.mg-header-actions{display:flex;align-items:center;gap:6px;font-size:12px}
.mg-header-actions a{padding:7px 9px;border-radius:8px;display:flex;flex-direction:column;line-height:1.12;white-space:nowrap}
.mg-header-actions a:hover{background:#f3f4f6}
.mg-header-actions small{font-size:10px;color:#687076}
.mg-header-actions strong{font-size:13px}
.mg-cart-count{display:inline-flex;min-width:20px;height:20px;border-radius:999px;background:var(--mg-orange);align-items:center;justify-content:center;font-weight:900;margin-left:3px;color:#111}
.mg-nav{background:var(--mg-nav);color:#fff}
.mg-nav .mg-container{display:flex;gap:2px;overflow:auto;white-space:nowrap;padding-block:7px;scrollbar-width:none}
.mg-nav .mg-container::-webkit-scrollbar{display:none}
.mg-nav a{padding:7px 11px;border-radius:6px;font-size:13px;font-weight:800}
.mg-nav a:hover{background:rgba(255,255,255,.12)}
.mg-shop-all{background:rgba(255,255,255,.08)}
.mg-main{padding-bottom:42px}

/* Compact, merchandise-led hero. */
.mg-hero{margin:18px auto 12px;background:linear-gradient(120deg,#fff 0%,#f8efe2 56%,#deeeec 100%);border:1px solid var(--mg-border);border-radius:18px;box-shadow:0 8px 24px rgba(0,0,0,.06);overflow:hidden;display:grid;grid-template-columns:1.2fr .8fr;min-height:230px}
.mg-hero-copy{padding:30px 36px;display:flex;flex-direction:column;justify-content:center}
.mg-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:950;color:var(--mg-teal)}
.mg-hero h1{font-size:clamp(34px,3.5vw,52px);line-height:1.02;margin:7px 0 10px;letter-spacing:-1.8px;max-width:680px}
.mg-hero p{font-size:16px;color:#4b5563;max-width:720px;margin:0 0 17px}
.mg-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 17px;border-radius:999px;background:var(--mg-teal);color:#fff;font-weight:900;border:0;cursor:pointer;font-size:13px}
.mg-btn:hover{background:var(--mg-teal-dark)}
.mg-hero-products{position:relative;min-height:230px;overflow:hidden;background:radial-gradient(circle at 55% 50%,rgba(245,162,74,.30),transparent 42%),radial-gradient(circle at 30% 35%,rgba(47,143,139,.20),transparent 38%)}
.mg-hero-product{position:absolute;width:142px;aspect-ratio:1/1;background:#fff;border:7px solid #fff;border-radius:13px;box-shadow:0 14px 30px rgba(0,0,0,.17);overflow:hidden;transition:.18s transform}
.mg-hero-product:hover{transform:translateY(-4px) rotate(0deg)!important;z-index:8}
.mg-hero-product img{width:100%;height:100%;object-fit:contain;background:#fff}
.mg-hero-product-1{left:11%;top:18%;transform:rotate(-8deg);z-index:2}
.mg-hero-product-2{left:39%;top:8%;transform:rotate(6deg);z-index:3}
.mg-hero-product-3{left:56%;top:37%;transform:rotate(-3deg);z-index:4}
.mg-hero-product-4{left:25%;top:45%;transform:rotate(4deg);z-index:5}

.mg-features{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}
.mg-feature{background:#fff;border:1px solid var(--mg-border);border-radius:10px;padding:10px 14px;text-align:center;display:flex;justify-content:center;gap:8px;align-items:baseline}
.mg-feature strong{font-size:12px}
.mg-feature span{font-size:11px;color:var(--mg-muted)}

.mg-section{margin:22px 0}
.mg-section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:11px}
.mg-section h2{margin:0;font-size:25px;letter-spacing:-.55px}
.mg-section-link{font-weight:900;color:var(--mg-teal);font-size:13px}
.mg-eyebrow{display:block;text-transform:uppercase;font-size:10px;letter-spacing:.12em;font-weight:950;color:var(--mg-orange);margin-bottom:2px}
.mg-eyebrow-light{color:#c9ece9}

.mg-category-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:11px}
.mg-category-card{background:#fff;border:1px solid var(--mg-border);border-radius:12px;overflow:hidden;box-shadow:0 3px 12px rgba(0,0,0,.035);transition:.18s transform,.18s box-shadow}
.mg-category-card:hover{transform:translateY(-2px);box-shadow:var(--mg-shadow)}
.mg-category-thumb{aspect-ratio:5/3;background:#f3f4f4;overflow:hidden}
.mg-category-thumb img{width:100%;height:100%;object-fit:cover}
.mg-category-body{padding:10px 11px 11px}
.mg-category-body strong{font-size:15px;display:block;line-height:1.2}
.mg-category-body span{color:var(--mg-muted);font-size:11px}

.mg-products{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:11px}
.mg-product-card{background:#fff;border:1px solid var(--mg-border);border-radius:11px;padding:9px;position:relative;display:flex;flex-direction:column;min-width:0;transition:.16s box-shadow,.16s transform}
.mg-product-card:hover{box-shadow:0 9px 24px rgba(0,0,0,.10);transform:translateY(-2px)}
.mg-product-badges{position:absolute;top:10px;left:10px;z-index:3;display:flex;gap:5px}
.mg-badge{background:var(--mg-teal);color:#fff;border-radius:999px;padding:3px 7px;font-size:9px;font-weight:950;text-transform:uppercase;letter-spacing:.04em}
.mg-badge-sale{background:var(--mg-orange);color:#171717}
.mg-product-image{aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:#f4f4f4;margin-bottom:8px}
.mg-product-image img{width:100%;height:100%;object-fit:contain;background:#fff}
.mg-product-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:15px;font-size:9px;color:#6b7280;margin-bottom:2px}
.mg-product-meta span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-product-meta .mg-low-stock{color:#b45309;font-weight:850}
.mg-product-title{font-size:12px;font-weight:750;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:31px;margin-bottom:5px}
.mg-product-price{font-weight:950;font-size:16px;margin-top:auto}
.mg-product-price del{color:#8b8b8b;font-weight:500;font-size:11px}
.mg-product-price ins{text-decoration:none}
.mg-card-actions{margin-top:7px}
.mg-card-actions .button,.mg-card-actions .added_to_cart{display:flex!important;justify-content:center!important;align-items:center;min-height:32px!important;width:100%!important;border-radius:999px!important;background:var(--mg-teal)!important;color:#fff!important;font-weight:850!important;font-size:11px!important;border:0!important;padding:0 8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.mg-card-actions .button:hover{background:var(--mg-teal-dark)!important}

.mg-banner{background:linear-gradient(115deg,#163c3a,#245b58);color:#fff;border-radius:14px;padding:19px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.mg-banner h3{margin:0 0 3px;font-size:23px}
.mg-banner p{margin:0;color:rgba(255,255,255,.82);font-size:13px}
.mg-banner .mg-btn{background:#fff;color:#173b3a;white-space:nowrap}
.mg-content{background:#fff;border:1px solid var(--mg-border);border-radius:16px;padding:24px;margin-top:24px}

.mg-footer{background:#173b3a;color:#fff;margin-top:36px;padding:38px 0 20px}
.mg-footer-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:30px}
.mg-footer h4{margin:0 0 10px}
.mg-footer p,.mg-footer a{color:rgba(255,255,255,.78);font-size:14px}
.mg-footer-bottom{border-top:1px solid rgba(255,255,255,.15);margin-top:28px;padding-top:16px;color:rgba(255,255,255,.65);font-size:13px}

/* WooCommerce catalog and product pages */
.woocommerce .woocommerce-breadcrumb{margin:18px 0;color:#6b7280}
.woocommerce ul.products{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:13px}
.woocommerce ul.products:before,.woocommerce ul.products:after{display:none!important}
.woocommerce ul.products li.product{float:none!important;width:auto!important;margin:0!important;background:#fff;border:1px solid var(--mg-border);border-radius:12px;padding:10px}
.woocommerce ul.products li.product a img{border-radius:8px;margin-bottom:9px!important}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:13px!important;line-height:1.3!important;min-height:34px}
.woocommerce ul.products li.product .price{font-size:16px!important;font-weight:900!important;color:var(--mg-ink)!important}
.woocommerce div.product{background:#fff;border-radius:18px;padding:22px}
.woocommerce button.button,.woocommerce a.button,.woocommerce input.button{background:var(--mg-teal)!important;color:#fff!important;border-radius:999px!important}
.woocommerce-message,.woocommerce-info,.woocommerce-error{border-radius:12px}

@media (max-width:1300px){
  .mg-products{grid-template-columns:repeat(6,1fr)}
  .mg-category-grid{grid-template-columns:repeat(5,1fr)}
  .woocommerce ul.products{grid-template-columns:repeat(5,1fr)}
  .mg-hero-product{width:125px}
}
@media (max-width:1100px){
  .mg-products{grid-template-columns:repeat(4,1fr)}
  .mg-category-grid{grid-template-columns:repeat(3,1fr)}
  .mg-header-main{grid-template-columns:1fr auto}.mg-search{grid-column:1/-1;grid-row:2}
  .mg-hero{grid-template-columns:1fr}.mg-hero-products{display:none}
  .woocommerce ul.products{grid-template-columns:repeat(4,1fr)}
}
@media (max-width:760px){
  .mg-container{width:min(100% - 20px,var(--mg-max))}
  .mg-header{position:static}
  .mg-header-main{gap:8px;padding:9px 0}
  .mg-brand{font-size:21px}
  .mg-header-actions .mg-account-link,.mg-header-actions .mg-orders-link{display:none}
  .mg-header-actions a{padding:6px 4px}
  .mg-search button{padding:0 16px}
  .mg-nav .mg-container{padding-block:6px}
  .mg-hero{margin-top:12px;min-height:auto}
  .mg-hero-copy{padding:23px 20px}
  .mg-hero h1{font-size:37px}
  .mg-hero p{font-size:14px}
  .mg-features{grid-template-columns:1fr;gap:6px}
  .mg-feature{justify-content:flex-start}
  .mg-category-grid{grid-template-columns:repeat(2,1fr)}
  .mg-products{grid-template-columns:repeat(2,1fr);gap:9px}
  .mg-section{margin:18px 0}
  .mg-section h2{font-size:21px}
  .mg-banner{align-items:flex-start;flex-direction:column}
  .mg-footer-grid{grid-template-columns:1fr 1fr}
  .woocommerce ul.products{grid-template-columns:repeat(2,1fr)}
}

/* Promotions & contests */
.mg-topbar-inner{display:flex;justify-content:center;gap:18px;align-items:center}
.mg-topbar a{color:#ffe0a8;font-weight:900;text-decoration:underline;text-underline-offset:2px}
.mg-promotions-nav{background:var(--mg-orange)!important;color:#151515!important;margin-left:4px}
.mg-promotions-nav:hover{background:#ffb764!important;color:#111!important}
.mg-promotions-home{margin-top:15px;margin-bottom:18px}
.mg-promo-section-head{align-items:center}
.mg-promo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.mg-promo-grid-single{grid-template-columns:1fr}
.mg-promo-card{background:linear-gradient(120deg,#173f3d 0%,#235c59 56%,#2f7772 100%);color:#fff;border-radius:15px;overflow:hidden;min-height:180px;display:grid;grid-template-columns:34% 1fr;box-shadow:0 7px 20px rgba(0,0,0,.10);border:1px solid rgba(0,0,0,.08)}
.mg-promo-card-large{grid-template-columns:minmax(240px,33%) 1fr;min-height:190px}
.mg-promo-card.mg-promo-no-image{display:block;background:linear-gradient(115deg,#153c3a 0%,#24605d 65%,#ef9e45 145%);position:relative}
.mg-promo-card.mg-promo-no-image:after{content:'★';position:absolute;right:4%;top:50%;transform:translateY(-50%) rotate(-8deg);font-size:120px;line-height:1;color:rgba(255,255,255,.08);pointer-events:none}
.mg-promo-art{display:block;background:#fff;min-height:180px;overflow:hidden}
.mg-promo-art img{width:100%;height:100%;object-fit:cover}
.mg-promo-content{padding:22px 24px;display:flex;flex-direction:column;justify-content:center;position:relative;z-index:1}
.mg-promo-badge{display:inline-flex;align-self:flex-start;background:var(--mg-orange);color:#151515;border-radius:999px;padding:5px 9px;font-size:10px;line-height:1;font-weight:950;text-transform:uppercase;letter-spacing:.055em;margin-bottom:8px}
.mg-promo-card h3{font-size:24px;line-height:1.08;margin:0 0 7px;letter-spacing:-.45px}
.mg-promo-card p{margin:0 0 14px;color:rgba(255,255,255,.86);font-size:13px;max-width:760px}
.mg-promo-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.mg-promo-button{display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#173f3d!important;border-radius:999px;min-height:36px;padding:0 14px;font-weight:950;font-size:12px}
.mg-promo-button:hover{background:#fff3df}
.mg-promo-end{font-size:11px;color:rgba(255,255,255,.74);font-weight:700}
.mg-promotions-page-head{padding:34px 0 20px;max-width:820px}
.mg-promotions-page-head h1{font-size:clamp(36px,5vw,60px);letter-spacing:-2px;line-height:1;margin:5px 0 10px}
.mg-promotions-page-head p{font-size:17px;color:#5d6570;margin:0}
.mg-promo-grid-archive{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:35px}
.mg-promotion-single h1{font-size:clamp(36px,5vw,58px);line-height:1.04;letter-spacing:-1.7px;margin:8px 0 20px}
.mg-promotion-single-image{max-width:920px;margin:0 0 25px}
.mg-promotion-single-image img{border-radius:14px}
.mg-entry-content{font-size:16px;max-width:900px}

@media (max-width:900px){
  .mg-promo-grid,.mg-promo-grid-archive{grid-template-columns:1fr}
  .mg-promo-card,.mg-promo-card-large{grid-template-columns:30% 1fr}
}
@media (max-width:760px){
  .mg-topbar-inner{justify-content:space-between;gap:8px;padding-inline:2px}
  .mg-topbar-inner span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mg-topbar a{white-space:nowrap}
  .mg-promotions-nav{order:-1}
  .mg-promo-card,.mg-promo-card-large{grid-template-columns:1fr}
  .mg-promo-art{max-height:210px}
  .mg-promo-content{padding:19px}
  .mg-promo-card h3{font-size:21px}
}
