:root{
  --cp-green-500:#75ba2d;
  --cp-green-900:#2c5d3f;
  --cp-green-950:#022d23;
  --cp-cream:#fbfcf7;
  --cp-charcoal:#1d2119;
}

/* Reset body/html padding on home page */
body.home,
html{
  margin:0 !important;
  padding:0 !important;
  overflow-x:hidden;
}

/* FORCE hide admin bar */
#wpadminbar{
  display:none !important;
}
body.admin-bar{
  margin-top:0 !important;
}
html{
  margin-top:0 !important;
}

/* === HEADER STYLING (ALL PAGES) === */
.site-header{
  background: var(--cp-green-950) !important;
  border-bottom: none !important; /* Remove border for seamless merge */
  position: relative;
  z-index: 100;
}

.main-header-bar{
  background: transparent !important;
  padding: 20px 48px !important; /* Increased padding */
}

.main-header-bar .ast-container{
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
}

/* Logo styling - WORKS ON ALL PAGES */
.site-branding{
  display: flex;
  align-items: center;
  min-height: 50px;
}

/* Hide ALL default logos/titles */
.site-title,
.site-branding .custom-logo,
.site-branding img,
.site-branding .custom-logo-link img{
  display: none !important;
}

/* Inject logo via CSS on ALL pages - foolproof method */
.site-branding::before{
  content: '';
  display: block;
  width: 180px;
  height: 40px;
  background: url('../assets/logo.svg') no-repeat left center;
  background-size: contain;
  margin-right: 20px;
}

/* If header.php logo exists, show it instead */
.cannapeace-logo{
  display: block !important;
  height: 40px;
  width: auto;
}

/* Navigation menu styling - ALL PAGES */
.main-header-menu{
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-header-menu > li{
  margin: 0;
  padding: 0;
}

.main-header-menu > li > a{
  color: #fff !important;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.main-header-menu > li > a:hover{
  background: rgba(255,255,255,0.1);
  color: var(--cp-green-500) !important;
}

.main-header-menu > li.current-menu-item > a,
.main-header-menu > li.current_page_item > a{
  color: var(--cp-green-500) !important;
}

/* Account button styling */
.main-header-menu > li:last-child > a{
  background: var(--cp-green-500);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
}

.main-header-menu > li:last-child > a:hover{
  filter: brightness(1.1);
  background: var(--cp-green-500);
}

/* === SHOP PAGE STYLING === */
.woocommerce .site-content,
.woocommerce-page .site-content{
  padding: 40px 20px !important;
  max-width: 1400px;
  margin: 0 auto;
}

.woocommerce ul.products{
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  padding: 20px 0 !important;
  margin: 0 !important;
}

.woocommerce ul.products li.product{
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  margin: 0 !important;
  width: auto !important;
}

.woocommerce ul.products li.product:hover{
  box-shadow: 0 8px 24px rgba(117,186,45,0.2);
  transform: translateY(-4px);
}

.woocommerce ul.products li.product img{
  border-radius: 6px;
  margin-bottom: 15px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size: 18px;
  color: var(--cp-charcoal);
  margin-bottom: 10px;
}

.woocommerce ul.products li.product .price{
  font-size: 20px;
  font-weight: 700;
  color: var(--cp-green-900);
  margin-bottom: 15px;
}

.woocommerce ul.products li.product .button{
  background: var(--cp-green-500) !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  width: 100%;
  text-align: center;
  transition: all 0.2s;
}

.woocommerce ul.products li.product .button:hover{
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(117,186,45,0.3);
}

/* Responsive shop grid */
@media (max-width: 1200px){
  .woocommerce ul.products{
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 900px){
  .woocommerce ul.products{
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px){
  .woocommerce ul.products{
    grid-template-columns: 1fr !important;
  }

  .woocommerce .site-content,
  .woocommerce-page .site-content{
    padding: 20px 15px !important;
  }
}

/* Shop page header */
.woocommerce .woocommerce-products-header{
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--cp-green-500);
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering{
  margin-bottom: 20px;
}

/* === CART PAGE STYLING === */
/* Fix narrow width constraint causing vertical text */
.woocommerce-cart,
.woocommerce-cart * {
  min-width: initial !important;
  width: auto !important;
}

.woocommerce-cart h1,
.woocommerce-cart h2,
.woocommerce-cart h3,
.woocommerce-cart h4,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .cart-empty {
  min-width: 300px !important;
  max-width: 100% !important;
  width: auto !important;
}

/* Ensure cart content container has proper width */
.woocommerce-cart .site-content,
.woocommerce-cart .entry-content,
.woocommerce-cart .woocommerce {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 40px 20px !important;
}

/* Empty cart message styling */
.woocommerce-cart .woocommerce-info {
  background: #f8f9fa !important;
  border: 2px solid var(--cp-green-500) !important;
  border-radius: 8px !important;
  padding: 20px 24px !important;
  text-align: center !important;
  font-size: 16px !important;
  color: var(--cp-charcoal) !important;
  margin-bottom: 40px !important;
}

.woocommerce-cart .woocommerce-info::before {
  color: var(--cp-green-500) !important;
  font-size: 20px !important;
}

/* Cart table styling */
.woocommerce-cart .woocommerce-cart-form {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 32px;
}

.woocommerce-cart table.cart {
  border: none !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.woocommerce-cart table.cart thead {
  background: var(--cp-green-950) !important;
}

.woocommerce-cart table.cart thead th {
  color: white !important;
  font-weight: 600 !important;
  padding: 16px !important;
  border: none !important;
}

.woocommerce-cart table.cart tbody tr {
  border-bottom: 1px solid #e5e7eb !important;
}

.woocommerce-cart table.cart tbody tr:last-child {
  border-bottom: none !important;
}

.woocommerce-cart table.cart td {
  padding: 20px 16px !important;
  vertical-align: middle !important;
}

.woocommerce-cart table.cart .product-thumbnail img {
  border-radius: 6px;
  max-width: 80px;
}

.woocommerce-cart table.cart .product-name a {
  color: var(--cp-charcoal) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  text-decoration: none !important;
}

.woocommerce-cart table.cart .product-name a:hover {
  color: var(--cp-green-500) !important;
}

.woocommerce-cart table.cart .product-price,
.woocommerce-cart table.cart .product-subtotal {
  font-weight: 600 !important;
  color: var(--cp-green-900) !important;
  font-size: 18px !important;
}

/* Quantity input */
.woocommerce-cart .quantity input.qty {
  border: 2px solid #e5e7eb !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 16px !important;
  width: 80px !important;
  text-align: center !important;
}

.woocommerce-cart .quantity input.qty:focus {
  border-color: var(--cp-green-500) !important;
  outline: none !important;
}

/* Update cart button */
.woocommerce-cart button[name="update_cart"] {
  background: var(--cp-green-500) !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.woocommerce-cart button[name="update_cart"]:hover {
  filter: brightness(1.1) !important;
}

/* Cart totals */
.woocommerce-cart .cart-collaterals {
  margin-top: 32px;
}

.woocommerce-cart .cart_totals {
  background: white !important;
  border-radius: 8px !important;
  padding: 24px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.woocommerce-cart .cart_totals h2 {
  color: var(--cp-charcoal) !important;
  font-size: 24px !important;
  margin-bottom: 20px !important;
  padding-bottom: 16px !important;
  border-bottom: 2px solid var(--cp-green-500) !important;
}

.woocommerce-cart .cart_totals table {
  border: none !important;
}

.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td {
  padding: 12px 0 !important;
  border: none !important;
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--cp-green-900) !important;
  padding-top: 20px !important;
  border-top: 2px solid #e5e7eb !important;
}

/* Proceed to checkout button */
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
  background: var(--cp-green-500) !important;
  color: white !important;
  border: none !important;
  padding: 16px 32px !important;
  border-radius: 8px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  width: 100% !important;
  text-align: center !important;
  text-decoration: none !important;
  display: block !important;
  transition: all 0.2s !important;
  box-shadow: 0 4px 12px rgba(117,186,45,0.3) !important;
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
  filter: brightness(1.1) !important;
  box-shadow: 0 6px 20px rgba(117,186,45,0.4) !important;
}

/* "New in store" products section - use shop grid */
.woocommerce-cart .products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  margin-top: 40px !important;
}

.woocommerce-cart .products li.product {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.woocommerce-cart .products li.product:hover {
  box-shadow: 0 8px 24px rgba(117,186,45,0.2);
  transform: translateY(-4px);
}

/* Responsive cart */
@media (max-width: 1200px) {
  .woocommerce-cart .products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .woocommerce-cart .products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .woocommerce-cart .products {
    grid-template-columns: 1fr !important;
  }

  .woocommerce-cart .site-content {
    padding: 20px 15px !important;
  }
}

/* Override Astra's CSS variables for container padding */
body.home{
  --ast-container-default-xlg-padding:0;
  --ast-container-default-lg-padding:0;
  --ast-container-default-slg-padding:0;
  --ast-container-default-md-padding:0;
  --ast-container-default-sm-padding:0;
  --ast-container-default-xs-padding:0;
  --ast-container-default-xxs-padding:0;
}

/* --- Neutralize whatever container Astra wraps around the front page --- */
/* Belt-and-suspenders: scoped to the home page so nothing else is affected. */
body.home #primary,
body.home .site-content,
body.home #content,
body.home #content .ast-container,
body.home .ast-container{
  max-width:none !important;
  padding:0 !important;
  margin:0 !important;
  width:100% !important;
}
body.home .entry-header,
body.home .ast-archive-description,
body.home h1.entry-title{ display:none; }

/* Main element full width */
.cp-home{
  width:100%;
  max-width:none;
  padding:0;
  margin:0;
}

/* --- HERO --- */
.cp-hero{
  /* Smooth diagonal gradient from top-left to bottom-right */
  background: linear-gradient(
    135deg,
    var(--cp-green-950) 0%,
    #024232 40%,
    var(--cp-green-900) 100%
  );
  padding: 140px 0 160px; /* More vertical space */
  text-align: center;
  position: relative;
  left: 0;
  right: 0;
  margin: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  /* Remove any border/line between header and hero */
  margin-top: 0 !important;
  border-top: none !important;
}

.cp-hero__inner{
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
}

.cp-hero__title{
  color: #fff;
  font-size: 64px;
  line-height: 1.15;
  margin: 0 0 24px;
  font-weight: 800;
  letter-spacing: -0.02em; /* Tighter tracking for large text */
}

.cp-hero__subtitle{
  color: var(--cp-cream);
  font-size: 28px;
  margin: 0 0 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.cp-hero__description{
  color: rgba(251, 252, 247, 0.9); /* Slightly transparent cream */
  font-size: 19px;
  margin: 0 0 48px; /* More space before buttons */
  opacity: 1;
  line-height: 1.7;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.cp-hero__buttons{
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.cp-btn{
  display: inline-block;
  padding: 18px 40px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid transparent;
  letter-spacing: 0.01em;
}

.cp-btn--primary{
  background: var(--cp-green-500);
  color: #fff;
  box-shadow: 0 4px 20px rgba(117, 186, 45, 0.35);
}

.cp-btn--primary:hover{
  background: #81c934; /* Slightly brighter */
  color: #fff;
  box-shadow: 0 6px 28px rgba(117, 186, 45, 0.45);
  transform: translateY(-2px);
}

.cp-btn--secondary{
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.cp-btn--secondary:hover{
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* --- FEATURES --- */
.cp-features{
  background: #fff;
  padding: 100px 32px;
}

.cp-section-title{
  text-align: center;
  color: var(--cp-charcoal);
  font-size: 42px;
  margin: 0 0 64px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cp-features__grid{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.cp-feature{
  text-align: center;
  padding: 32px 24px;
  transition: transform 0.3s ease;
}

.cp-feature:hover{
  transform: translateY(-8px);
}

.cp-feature__icon{
  font-size: 56px;
  margin-bottom: 24px;
  display: block;
}

.cp-feature h3{
  color: var(--cp-green-900);
  font-size: 22px;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cp-feature p{
  color: #4b5563;
  font-size: 16px;
  margin: 0;
  line-height: 1.7;
}

/* --- CATEGORIES --- */
.cp-categories{
  padding: 100px 32px;
  background: var(--cp-cream);
}

.cp-categories__grid{
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.cp-card{
  display: block;
  padding: 48px 40px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid rgba(117, 186, 45, 0.15);
  text-decoration: none;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cp-card:hover{
  border-color: var(--cp-green-500);
  box-shadow: 0 16px 48px rgba(117, 186, 45, 0.20);
  transform: translateY(-10px);
  background: linear-gradient(135deg, #fff 0%, rgba(117, 186, 45, 0.02) 100%);
}

.cp-card__icon{
  font-size: 56px;
  display: block;
  margin-bottom: 24px;
}

.cp-card h3{
  font-size: 26px;
  margin: 0 0 16px;
  color: var(--cp-charcoal);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cp-card p{
  margin: 0;
  color: #6b7280;
  font-size: 16px;
  line-height: 1.7;
}

/* === LANGUAGE SWITCHER === */
.cp-language-switcher{
  position: relative;
  display: inline-block;
  margin-left: 24px;
}

.cp-lang-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cp-lang-toggle:hover{
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.cp-lang-flag{
  font-size: 20px;
  line-height: 1;
}

.cp-lang-name{
  font-weight: 500;
}

.cp-lang-arrow{
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.cp-language-switcher.active .cp-lang-arrow{
  transform: rotate(180deg);
}

.cp-lang-dropdown{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.cp-language-switcher.active .cp-lang-dropdown{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cp-lang-option{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--cp-charcoal);
  text-decoration: none;
  transition: background 0.15s ease;
  border-bottom: 1px solid #f3f4f6;
}

.cp-lang-option:last-child{
  border-bottom: none;
}

.cp-lang-option:hover{
  background: #f9fafb;
}

.cp-lang-option.active{
  background: #f0fdf4;
  color: var(--cp-green-900);
  font-weight: 600;
}

.cp-lang-check{
  margin-left: auto;
  color: var(--cp-green-500);
}

/* Flags-only style */
.cp-language-switcher-flags{
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 24px;
}

.cp-lang-flag-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 24px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.cp-lang-flag-btn:hover{
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.cp-lang-flag-btn.active{
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* --- RESPONSIVE --- */
@media (max-width:768px){
  .cp-hero{ padding:80px 20px; }
  .cp-hero__title{ font-size:40px; }
  .cp-hero__subtitle{ font-size:20px; }
  .cp-hero__description{ font-size:16px; }
  .cp-features__grid,
  .cp-categories__grid{ grid-template-columns:1fr; }

  .cp-language-switcher{
    margin-left: 12px;
  }

  .cp-lang-toggle{
    padding: 6px 12px;
    font-size: 14px;
  }

  .cp-lang-name{
    display: none; /* Hide language name on mobile */
  }

  .cp-lang-dropdown{
    min-width: 160px;
  }
}
