/*
Theme Name: Amawta Botanicals LLC (v9)
Author: Amawta Botanicals LLC
Description: Earth-tone full-width WooCommerce theme with sticky footer and full-width cart/checkout pages.
Version: 1.9
License: GPLv2 or later
Text Domain: amawta-botanicals-minimal
*/

:root {
  --ab-cream: #f5f0e8;
  --ab-brown: #6b4f3b;
  --ab-green: #7a9a6c;
  --ab-gold: #c27a2c;
  --ab-dark: #3b2717;
  --logo-max-height: 80px;
  --tagline-color: #6b4f3b;
}

/* ===== GLOBAL LAYOUT (Sticky footer setup) ===== */
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ab-cream);
  color: var(--ab-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
.site-main {
  flex: 1 0 auto;
}
.site-footer {
  flex-shrink: 0;
}

/* ===== LINKS ===== */
a {
  color: var(--ab-brown);
  text-decoration: none;
}
a:hover {
  color: var(--ab-gold);
  text-decoration: underline;
}

/* ===== HEADER ===== */
.site-header {
  background: #fdf7ec;
  border-bottom: 1px solid rgba(107, 79, 59, 0.2);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo + text horizontally */
.site-logo-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-logo img {
  display: block;
  height: auto !important;
  width: auto !important;
  max-height: var(--logo-max-height) !important;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.site-text {
  display: flex;
  flex-direction: column;
}
.site-title {
  margin: 0;
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--ab-dark);
}
.site-title a {
  color: inherit;
  text-decoration: none;
}
.site-description {
  margin: 0.1rem 0 0;
  font-family: serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--tagline-color);
}

/* Search */
.header-search form {
  display: flex;
  gap: 0.4rem;
}
.header-search .search-field {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(107, 79, 59, 0.3);
}
.header-search .search-submit {
  background: var(--ab-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

/* ===== NAVIGATION ===== */
.primary-navigation {
  border-top: 1px solid rgba(107, 79, 59, 0.1);
  padding: 0.5rem 1.5rem;
}
.primary-navigation .menu {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.primary-navigation .menu li a {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.2rem;
}
.primary-navigation .menu li a:hover,
.primary-navigation .menu li.current-menu-item > a {
  border-color: var(--ab-gold);
}

/* ===== MAIN CONTAINER ===== */
.site-main,
.woocommerce-page #content,
.woocommerce-page .content-area {
  max-width: 1200px;
  margin: 1.5rem auto 2rem;
  padding: 0 1.5rem;
}

/* ===== HERO ===== */
.hero {
  background: radial-gradient(circle at top left, #fffaf3 0, #f5f0e8 55%, #ecdccc 100%);
  border-radius: 18px;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}
.hero h1 {
  margin: 0;
  font-size: 2.4rem;
  text-transform: uppercase;
}
.hero p {
  margin: 0.5rem 0;
}

/* ===== PRODUCTS ===== */
.woocommerce ul.products {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.woocommerce ul.products li.product {
  flex: 1 1 220px;
  max-width: 260px;
  background: var(--ab-cream);
  border: 1px solid rgba(107, 79, 59, 0.18);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(107, 79, 59, 0.12);
}
.woocommerce ul.products li.product .price {
  color: var(--ab-green);
  font-weight: 600;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #4a3528;
  color: #f9f5ef;
  margin-top: 2rem;
  padding: 2rem 1.5rem;
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 1.5rem;
}
.footer-widget-column .widget-title {
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.footer-widget-column .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-widget-column .widget ul li {
  margin-bottom: 0.35rem;
}
.footer-widget-column .widget a,
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.footer-widget-column .widget a:hover,
.site-footer a:hover {
  text-decoration: underline;
}
.site-info {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

/* ===== CART, CHECKOUT & ACCOUNT LAYOUT (FULL WIDTH) ===== */

/* Main WooCommerce container on these pages */
.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.woocommerce-account .site-main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Inner content wrapper (classic templates) */
.woocommerce-cart .site-main > *,
.woocommerce-checkout .site-main > *,
.woocommerce-account .site-main > * {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 1.5rem auto 2rem !important;
    padding: 0 1.5rem !important;
}

/* Entry content sometimes carries a narrow max-width */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* WooCommerce BLOCK Cart/Checkout containers */
.wc-block-cart,
.wc-block-checkout,
.wc-block-cart .wc-block-cart__main,
.wc-block-checkout .wc-block-checkout__main {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 1.5rem auto 2rem !important;
    padding: 0 1.5rem !important;
}

/* Tables and columns should use full content width */
.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table,
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .col2-set,
.woocommerce-checkout-review-order,
.woocommerce-checkout-payment {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* ===== ALIGN SHOP & PRODUCT PAGES TO LEFT ===== */
.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main,
.single-product .site-main {
    margin-left: 1.5rem !important;
    margin-right: auto !important;
}


/* ===== HIDE WOO SIDEBAR ===== */
.woocommerce-page #secondary,
.woocommerce-page .widget-area,
.woocommerce-page .sidebar,
.woocommerce-page .woocommerce-sidebar {
  display: none !important;
}
/* ===== TWO-COLUMN CHECKOUT: ORDER SUMMARY ON RIGHT ===== */

/* Reset any previous floats / widths for checkout elements */
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    width: 100%;
    float: none;
}

/* Desktop layout for classic checkout */
@media (min-width: 900px) {

    /* Two-column layout: details left, summary right */
    .woocommerce-checkout #customer_details {
        width: 58%;
        float: left;
        margin-right: 2%;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 40%;
        float: right;
        clear: right; /* keep heading + summary stacked in the right column */
    }

    /* Make the order review table fill its column */
    .woocommerce-checkout #order_review .shop_table {
        width: 100%;
    }
}

/* ===== WooCommerce BLOCKS checkout (new block-based checkout) ===== */
@media (min-width: 900px) {
    .wc-block-checkout {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        max-width: 1200px;
        margin: 1.5rem auto 2rem;
        padding: 0 1.5rem;
    }

    .wc-block-checkout__main {
        flex: 2 1 0;
    }

    .wc-block-checkout__sidebar {
        flex: 1 1 0;
    }
}
/* ===== MOBILE FIXES (≤ 768px) ===== */
@media (max-width: 768px) {

    /* General content: use full width with small side padding */
    .site-main,
    .woocommerce-page #content,
    .woocommerce-page .content-area,
    .woocommerce-cart .woocommerce,
    .woocommerce-checkout .woocommerce,
    .woocommerce-account .woocommerce,
    .wc-block-cart,
    .wc-block-checkout,
    .wc-block-cart .wc-block-cart__main,
    .wc-block-checkout .wc-block-checkout__main {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem !important;
    }

    /* Inner wrappers on cart / checkout: no extra max-width that causes shift */
    .woocommerce-cart .site-main > *,
    .woocommerce-checkout .site-main > *,
    .woocommerce-account .site-main > *,
    .woocommerce-cart .entry-content,
    .woocommerce-checkout .entry-content,
    .woocommerce-account .entry-content {
        max-width: 100% !important;
        width: 100% !important;
        margin: 1rem 0 2rem !important;
        padding: 0 !important;
    }

    /* Cart & checkout tables should not overflow horizontally */
    .woocommerce-cart table.shop_table,
    .woocommerce-checkout table.shop_table {
        width: 100% !important;
    }

    /* Shop / product pages: remove left alignment on mobile so nothing is shifted right */
    .post-type-archive-product .site-main,
    .tax-product_cat .site-main,
    .tax-product_tag .site-main,
    .single-product .site-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Header layout: stack neatly on mobile */
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .brand-left {
        width: 100%;
        justify-content: flex-start;
    }

    .header-search {
        width: 100%;
    }

    .header-search form {
        width: 100%;
    }

    .header-search .search-field {
        flex: 1;
        width: 100%;
    }

    /* Main menu: vertical list, no weird letter stacking */
    .primary-navigation .menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .primary-navigation .menu li a {
        font-size: 0.9rem;
        letter-spacing: 0.03em; /* a bit less tracking so text doesn’t break oddly */
        border-bottom-width: 1px;
    }
}
/* ===== FINAL MOBILE FIX FOR CHECKOUT SHIFTING RIGHT ===== */
@media (max-width: 768px) {

    /* Force all main checkout containers to center and fill width */
    body.woocommerce-checkout,
    .woocommerce-checkout .site-main,
    .woocommerce-checkout .site-main > *,
    .woocommerce-checkout .woocommerce,
    .woocommerce-checkout .entry-content,
    .woocommerce-checkout form.checkout,
    .wc-block-checkout,
    .wc-block-checkout .wc-block-checkout__main,
    .wc-block-checkout .wc-block-checkout__sidebar {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 1rem !important;
        float: none !important;
    }

    /* Make sure any columns inside checkout stack and are full width */
    .woocommerce-checkout .col2-set,
    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Prevent horizontal scroll from any overflow */
    body.woocommerce-checkout {
        overflow-x: hidden;
    }
}
