/*
Theme Name: M-Town Treats
Theme URI: https://mtowntreats.com
Author: Buzz Ur Brand
Author URI: https://buzzurbrand.com
Description: A warm, artisan-bakery classic WordPress theme for M-Town Treats. WooCommerce-ready, built for scratch-made ice cream, dirty sodas, and sweets. Cream and espresso palette with caramel accents.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mtown-treats
WC requires at least: 6.0
WC tested up to: 9.0
*/

:root{
  --mtt-cream:#f3ecdc;
  --mtt-cream-deep:#e9ddc4;
  --mtt-espresso:#3a2317;
  --mtt-espresso-soft:#5a4030;
  --mtt-caramel:#c8873f;
  --mtt-caramel-deep:#a86a28;
  --mtt-gold:#e0a94e;
  --mtt-line:#d8c7a5;
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Nunito Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  background:var(--mtt-cream);
  color:var(--mtt-espresso);
  line-height:1.6;
}
a{color:var(--mtt-caramel-deep);}
h1,h2,h3,h4{font-family:'Oswald',Impact,sans-serif;letter-spacing:.5px;color:var(--mtt-espresso);}
img{max-width:100%;height:auto;}

.mtt-container{max-width:1200px;margin:0 auto;padding:0 24px;}

/* ---------- SKIP LINK ---------- */
.skip-link{position:absolute;left:-9999px;}
.skip-link:focus{left:8px;top:8px;background:#fff;padding:8px 14px;z-index:1000;border-radius:6px;}

/* ---------- HEADER ---------- */
.site-header{
  background:var(--mtt-cream);
  border-bottom:2px solid var(--mtt-line);
  position:sticky;top:0;z-index:50;
  box-shadow:0 2px 12px rgba(58,35,23,0.06);
}
.header-inner{
  max-width:1200px;margin:0 auto;padding:14px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
}
.site-logo img{height:64px;width:auto;display:block;}
.site-logo .site-title-text{
  font-family:'Oswald',sans-serif;font-size:1.8rem;text-transform:uppercase;
  color:var(--mtt-espresso);text-decoration:none;font-weight:700;
}
.main-nav{display:flex;align-items:center;gap:28px;}
.main-nav ul{display:flex;align-items:center;gap:28px;list-style:none;margin:0;padding:0;}
.main-nav a{
  text-transform:uppercase;font-family:'Oswald',sans-serif;font-size:0.95rem;font-weight:600;
  color:var(--mtt-espresso);text-decoration:none;padding:6px 2px;
  border-bottom:2px solid transparent;transition:all .2s;
}
.main-nav a:hover,.main-nav .current-menu-item>a{color:var(--mtt-caramel-deep);border-bottom-color:var(--mtt-caramel);}

.header-cart a{
  display:flex;align-items:center;gap:8px;
  background:var(--mtt-espresso);color:var(--mtt-cream)!important;
  padding:8px 16px;border-radius:30px;text-decoration:none;
  font-family:'Oswald',sans-serif;text-transform:uppercase;font-size:0.9rem;font-weight:600;
  transition:background .2s;
}
.header-cart a:hover{background:var(--mtt-caramel-deep);}
.header-cart .cart-count{
  background:var(--mtt-gold);color:var(--mtt-espresso);
  border-radius:50%;min-width:22px;height:22px;padding:0 5px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:0.8rem;font-weight:700;
}

/* mobile nav toggle */
.nav-toggle{display:none;background:none;border:none;cursor:pointer;font-size:1.6rem;color:var(--mtt-espresso);}

/* ---------- HERO ---------- */
.mtt-hero{
  text-align:center;padding:70px 24px 60px;
  background:
    radial-gradient(circle at 20% 20%, rgba(224,169,78,0.12), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(200,135,63,0.12), transparent 45%),
    var(--mtt-cream);
  border-bottom:1px solid var(--mtt-line);
}
.mtt-hero .star{color:var(--mtt-caramel);font-size:1.4rem;letter-spacing:8px;}
.mtt-hero h1{
  font-size:3.4rem;font-weight:700;margin:8px 0 10px;
  text-transform:uppercase;line-height:1.05;
}
.mtt-hero p{font-size:1.2rem;max-width:560px;margin:0 auto 26px;color:var(--mtt-espresso-soft);}

/* ---------- BUTTONS ---------- */
.mtt-btn,.mtt-hero .button{
  display:inline-block;text-transform:uppercase;font-family:'Oswald',sans-serif;
  font-weight:600;font-size:1rem;text-decoration:none;cursor:pointer;
  border:none;border-radius:8px;padding:14px 32px;transition:all .2s;
  background:var(--mtt-caramel);color:#fff;letter-spacing:.5px;
}
.mtt-btn:hover{background:var(--mtt-caramel-deep);}

/* ---------- STORE / PRODUCT GRID ---------- */
.mtt-store{max-width:1200px;margin:0 auto;padding:56px 24px;}
.mtt-section-title{text-align:center;font-size:2rem;text-transform:uppercase;margin:0 0 4px;}
.mtt-section-rule{width:70px;height:3px;background:var(--mtt-caramel);margin:0 auto 40px;border-radius:2px;}
.mtt-cat{margin-bottom:56px;}
.mtt-cat-head{display:flex;align-items:center;gap:16px;margin-bottom:24px;}
.mtt-cat-head h3{font-size:1.5rem;text-transform:uppercase;margin:0;color:var(--mtt-caramel-deep);white-space:nowrap;}
.mtt-cat-head::after{content:"";flex:1;height:1px;background:var(--mtt-line);}

.mtt-grid,ul.products{
  display:grid!important;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:24px;
  list-style:none;margin:0;padding:0;
}
.mtt-card,ul.products li.product{
  background:#fff;border:1px solid var(--mtt-line);border-radius:14px;
  overflow:hidden;display:flex!important;flex-direction:column;
  transition:transform .2s, box-shadow .2s;margin:0!important;width:auto!important;text-align:left;
}
.mtt-card:hover,ul.products li.product:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(58,35,23,0.12);}
.mtt-card-img{height:150px;background:linear-gradient(135deg,var(--mtt-cream-deep),var(--mtt-gold));display:flex;align-items:center;justify-content:center;font-size:2.6rem;overflow:hidden;}
.mtt-card-img img{width:100%;height:100%;object-fit:cover;}
.mtt-card-body{padding:18px;display:flex;flex-direction:column;flex:1;}
.mtt-card h4,ul.products li.product .woocommerce-loop-product__title{
  font-family:'Oswald',sans-serif;font-size:1.15rem;margin:0 0 4px;text-transform:uppercase;padding:0;
}
.mtt-card .desc{font-size:0.85rem;color:var(--mtt-espresso-soft);margin:0 0 14px;flex:1;}
.mtt-card select,.mtt-card-body select{
  width:100%;padding:8px;margin-bottom:10px;border:1px solid var(--mtt-line);
  border-radius:6px;font-family:inherit;background:var(--mtt-cream);color:var(--mtt-espresso);
}
.mtt-card .price,ul.products li.product .price{
  font-family:'Oswald',sans-serif!important;font-size:1.3rem!important;color:var(--mtt-caramel-deep)!important;margin-bottom:12px;font-weight:600;
}
.mtt-card .price del{color:var(--mtt-espresso-soft);font-size:1rem;}

/* WooCommerce buttons */
.mtt-card .button,
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt{
  background:var(--mtt-espresso)!important;color:#fff!important;text-transform:uppercase;font-weight:600;
  border:none!important;border-radius:8px!important;padding:10px 16px!important;cursor:pointer;
  font-family:'Oswald',sans-serif!important;letter-spacing:.5px;transition:background .2s;
  display:inline-block;text-decoration:none;
}
.mtt-card .button:hover,
.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover{background:var(--mtt-caramel-deep)!important;}

.woocommerce ul.products li.product a img{margin:0;border-radius:0;}
.woocommerce ul.products li.product .woocommerce-loop-product__title{padding:14px 18px 4px;}
.woocommerce ul.products li.product .price{padding:0 18px;}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button{margin:12px 18px 18px;}

/* WooCommerce notices */
.woocommerce-message,.woocommerce-info,.woocommerce-error{border-top-color:var(--mtt-caramel)!important;}
.woocommerce-message::before,.woocommerce-info::before{color:var(--mtt-caramel)!important;}

/* Woo generic pages (cart, checkout, account) get a content wrap */
.mtt-woo-wrap{max-width:1200px;margin:0 auto;padding:48px 24px;min-height:50vh;}
.mtt-woo-wrap h1.entry-title,.mtt-page h1.entry-title{font-size:2.2rem;text-transform:uppercase;margin-bottom:24px;}

/* ---------- GENERIC PAGE ---------- */
.mtt-page{max-width:900px;margin:0 auto;padding:48px 24px;min-height:40vh;}
.mtt-page img{border-radius:10px;}

/* ---------- FOOTER ---------- */
.site-footer{background:var(--mtt-espresso);color:var(--mtt-cream-deep);text-align:center;padding:44px 24px;margin-top:20px;}
.site-footer .fnav{display:flex;gap:24px;justify-content:center;flex-wrap:wrap;margin-bottom:16px;list-style:none;padding:0;}
.site-footer a{color:var(--mtt-gold);text-decoration:none;text-transform:uppercase;font-family:'Oswald',sans-serif;font-size:0.9rem;}
.site-footer a:hover{color:#fff;}
.site-footer .fine{font-size:0.85rem;opacity:0.7;margin-top:8px;}

/* ---------- RESPONSIVE ---------- */
@media(max-width:820px){
  .nav-toggle{display:block;}
  .main-nav{
    display:none;position:absolute;top:100%;left:0;right:0;
    background:var(--mtt-cream);border-bottom:2px solid var(--mtt-line);
    flex-direction:column;padding:16px 24px;box-shadow:0 8px 16px rgba(58,35,23,0.1);
  }
  .main-nav.open{display:flex;}
  .main-nav ul{flex-direction:column;align-items:flex-start;gap:14px;width:100%;}
  .mtt-hero h1{font-size:2.4rem;}
  .site-logo img{height:48px;}
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  *{transition:none!important;}
  .mtt-card:hover,ul.products li.product:hover{transform:none;}
}
