/*
Theme Name: Phannuella Couture
Theme URI:  https://phannuella-couture.com
Description: Boutique e-commerce élégante pour tailleur camerounais — prêt-à-porter, wax et mode africaine. Compatible WooCommerce.
Author:      Phannuella Couture
Version:     1.4.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GPL-2.0-or-later
Text Domain: phannuella-couture
Tags: e-commerce, woocommerce, fashion, custom-colors, full-width-template
*/

:root {
  --pc-violet: #6B3FA0;
  --pc-violet-dark: #4A2C72;
  --pc-violet-light: #9B6FD4;
  --pc-lavender: #EDE4F7;
  --pc-lilac: #C9A8E8;
  --pc-gold: #d4a853;
  --pc-rose: #B87A9B;
  --pc-cream: #FAF7FC;
  --pc-dark: #2D1B3D;
  --pc-warm-white: #FDFBFF;
  --pc-shadow: 0 12px 40px rgba(74, 44, 114, 0.1);
  --pc-radius: 16px;
  --pc-font-display: "Playfair Display", Georgia, serif;
  --pc-font-body: "DM Sans", system-ui, sans-serif;
  /* Alias compatibilité */
  --pc-green: var(--pc-violet);
  --pc-terracotta: var(--pc-violet-light);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--pc-font-body);
  color: var(--pc-dark);
  background: var(--pc-warm-white);
  line-height: 1.6;
}

a { color: var(--pc-violet); }
a:hover { color: var(--pc-violet-dark); }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(107, 63, 160, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 32px rgba(74, 44, 114, 0.12);
  border-bottom-color: rgba(107, 63, 160, 0.18);
}

.header-inner {
  max-width: min(1600px, 94vw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand search actions";
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 0;
}

.site-brand { grid-area: brand; }
.header-actions { grid-area: actions; }

.header-search {
  grid-area: search;
  position: relative;
  display: flex;
  align-items: stretch;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.header-search-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(107, 63, 160, 0.25);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 0.85rem 1.4rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: #fff;
}

.header-search-input:focus {
  border-color: var(--pc-violet);
}

.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--pc-violet);
  color: #fff;
  padding: 0 1.75rem;
  border-radius: 0 999px 999px 0;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.header-search-btn:hover { background: var(--pc-violet-dark); }

.header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--pc-shadow);
  border: 1px solid rgba(107, 63, 160, 0.12);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  padding: 0.4rem;
}

.header-search-results[hidden] { display: none; }

.header-search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.header-search-result:hover,
.header-search-result.is-active {
  background: var(--pc-lavender);
}

.header-search-result img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--pc-lavender);
}

.header-search-result-title {
  font-weight: 600;
  font-size: 0.88rem;
  display: block;
}

.header-search-result-price {
  font-size: 0.8rem;
  color: var(--pc-violet);
}

.header-search-empty {
  padding: 0.7rem;
  font-size: 0.85rem;
  color: rgba(45, 27, 61, 0.7);
  text-align: center;
}

.header-search-seeall {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--pc-violet);
  text-decoration: none;
  border-top: 1px solid rgba(107, 63, 160, 0.1);
  margin-top: 0.25rem;
  padding: 0.6rem;
}

.header-nav-bar {
  border-top: 1px solid rgba(107, 63, 160, 0.08);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.site-brand:hover .site-brand-name {
  color: var(--pc-violet);
}

.site-brand-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--pc-lavender), #fff);
  box-shadow: 0 4px 14px rgba(107, 63, 160, 0.15);
}

.site-brand-mark .phannuella-logo--icon-color {
  max-height: 34px;
  width: auto;
}

.site-brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.site-brand-name {
  font-family: var(--pc-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pc-dark);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.site-brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-violet-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--pc-lavender);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--pc-violet-dark);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-branding .site-title {
  font-family: var(--pc-font-display);
  font-size: 1.6rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-branding .site-title a {
  color: var(--pc-dark);
  text-decoration: none;
}

.site-branding .site-description {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pc-violet);
  font-style: italic;
}

.site-logo-link,
.footer-logo-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}

.site-logo-link .custom-logo,
.phannuella-logo--header {
  max-height: 56px;
  width: auto;
}

.footer-logo-link .phannuella-logo--footer {
  max-height: 52px;
  width: auto;
  margin-bottom: 0.75rem;
}

.hero-logo {
  margin-bottom: 1.25rem;
}

.hero-logo .phannuella-logo--horizontal-light {
  max-height: 72px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

@media (max-width: 992px) {
  .header-top {
    grid-template-columns: auto auto auto;
    grid-template-areas:
      "brand toggle actions"
      "search search search";
    row-gap: 0.6rem;
    padding: 0.75rem 0;
  }

  .nav-toggle {
    display: flex;
    grid-area: toggle;
    justify-self: end;
  }

  .header-search {
    max-width: none;
    margin: 0;
  }

  .main-navigation {
    display: none;
    padding: 0.5rem 0;
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-navigation a {
    display: block;
    text-align: center;
  }

  .header-cart-label {
    display: none;
  }
}

@media (max-width: 768px) {
  .phannuella-logo--header { max-height: 44px; }
  .hero-watermark { display: none; }
  .site-brand { justify-content: center; }
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.main-navigation a {
  text-decoration: none;
  color: var(--pc-dark);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--pc-violet);
  background: var(--pc-lavender);
}

/* Hero */
.hero-section {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(74, 44, 114, 0.95) 0%, rgba(107, 63, 160, 0.88) 45%, rgba(155, 111, 212, 0.82) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A8E8' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-watermark {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.12;
  pointer-events: none;
}

.hero-watermark .phannuella-logo--icon-color {
  width: min(280px, 40vw);
  height: auto;
  filter: brightness(0) invert(1);
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  color: #fff;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(201, 168, 232, 0.3);
  border: 1px solid var(--pc-lilac);
  color: var(--pc-lavender);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-family: var(--pc-font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 700px;
}

.hero-content p {
  font-size: 1.15rem;
  max-width: 520px;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--pc-violet) 0%, var(--pc-violet-light) 100%);
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(107, 63, 160, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline-dark {
  background: transparent;
  color: var(--pc-violet-dark) !important;
  border: 2px solid var(--pc-violet);
}

.btn-outline-dark:hover {
  background: var(--pc-lavender);
}

/* Sections */
.site-main { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem; }

.section-title {
  font-family: var(--pc-font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--pc-dark);
}

.section-subtitle {
  text-align: center;
  color: #6b5a4e;
  margin: 0 0 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature-card {
  background: #fff;
  border-radius: var(--pc-radius);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--pc-shadow);
  border: 1px solid var(--pc-lavender);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-family: var(--pc-font-display);
  margin: 0 0 0.5rem;
  color: var(--pc-violet);
}

/* WooCommerce overrides */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
  content: none !important;
}

.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: var(--pc-shadow);
  border: 1px solid var(--pc-lavender);
  transition: transform 0.25s, box-shadow 0.25s;
  margin: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  height: 100%;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(44, 24, 16, 0.12);
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  text-decoration: none;
  color: inherit;
}

.woocommerce ul.products li.product img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  background: var(--pc-cream);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--pc-font-display);
  padding: 1rem 1rem 0.25rem;
  font-size: 1.05rem;
  line-height: 1.35;
  min-height: 2.7em;
  margin: 0;
  color: var(--pc-dark);
}

.woocommerce ul.products li.product .price {
  color: var(--pc-violet) !important;
  font-weight: 700;
  padding: 0 1rem;
  margin: 0 0 0.25rem;
  display: block;
  font-size: 1.05rem;
}

.woocommerce ul.products li.product .vendor-product-badge {
  font-size: 0.8rem;
  margin: 0 1rem 0.5rem !important;
  padding: 0;
  order: 1;
}

.woocommerce ul.products li.product .vendor-product-badge a {
  color: var(--pc-green);
  text-decoration: none;
  font-weight: 600;
}

.woocommerce ul.products li.product .vendor-product-badge a:hover {
  color: var(--pc-terracotta);
}

.woocommerce ul.products li.product .button,
.woocommerce .single_add_to_cart_button {
  display: inline-block;
  margin: auto 1rem 1rem !important;
  align-self: flex-start;
  background: var(--pc-violet) !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 600;
  padding: 0.6rem 1.25rem !important;
  white-space: nowrap;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce .single_add_to_cart_button:hover {
  background: var(--pc-violet-dark) !important;
}

.woocommerce .single_add_to_cart_button {
  margin: 1rem 0 0 !important;
  padding: 0.75rem 2rem !important;
  font-size: 1rem;
}

.woocommerce span.onsale {
  background: var(--pc-rose) !important;
  border-radius: 999px;
  min-height: auto;
  line-height: 1.4;
  padding: 0.3rem 0.75rem;
}

.woocommerce .woocommerce-breadcrumb {
  margin-bottom: 1.5rem;
  color: #6b5a4e;
}

.woocommerce-checkout .woocommerce-info {
  border-top-color: var(--pc-gold);
  background: var(--pc-cream);
}

.payment_method_tailor_mobile_money label {
  font-weight: 700;
  color: var(--pc-green);
}

.payment_method_cod label {
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--pc-violet-dark) 0%, var(--pc-dark) 100%);
  color: rgba(255,255,255,0.85);
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.site-footer h3 {
  font-family: var(--pc-font-display);
  color: var(--pc-gold);
  margin-top: 0;
}

.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer a:hover { color: var(--pc-gold); }

.footer-bottom {
  text-align: center;
  padding: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

.cameroon-flag {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.cameroon-flag span {
  width: 8px;
  height: 14px;
  display: inline-block;
}

.cameroon-flag .g { background: #007a5e; }
.cameroon-flag .r { background: #ce1126; }
.cameroon-flag .y { background: #fcd116; }

/* Payment badges */
.payment-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.payment-badge {
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-violet { background: var(--pc-violet, #6B3FA0); color: #fff; }
.badge-lilac { background: var(--pc-lilac, #C9A8E8); color: var(--pc-dark, #2D1B3D); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: flex-end;
}

.header-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pc-violet), var(--pc-violet-light));
  box-shadow: 0 4px 14px rgba(107, 63, 160, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.header-cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(107, 63, 160, 0.35);
  color: #fff;
}

.header-cart .count {
  background: #fff;
  color: var(--pc-violet);
  font-size: 0.7rem;
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.35rem;
  border-radius: 999px;
  margin-left: 0;
}

.header-measures {
  text-decoration: none;
  color: var(--pc-violet, #6B3FA0);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--pc-lavender, #EDE4F7);
  white-space: nowrap;
}

.header-measures:hover {
  background: var(--pc-violet, #6B3FA0);
  color: #fff;
}

/* Homepage */
.home .site-main {
  padding-top: 2rem;
}

.home-category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 auto 2rem;
}

.home-category-pill {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--pc-lavender, #EDE4F7);
  color: var(--pc-dark, #2D1B3D);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.home-category-pill:hover {
  background: var(--pc-violet-light, #9B6FD4);
  color: #fff;
  transform: translateY(-1px);
}

.home-category-pill.is-active {
  background: var(--pc-violet, #6B3FA0);
  color: #fff;
}

.home-products {
  margin: 0 auto 2rem;
  max-width: 1200px;
}

.home-products ul.products {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  grid-template-columns: repeat(3, 1fr) !important;
}

.home-products ul.products li.product::before {
  display: none !important;
}

.home-products .woocommerce-result-count,
.home-products .woocommerce-ordering {
  display: none;
}

.home-cta {
  text-align: center;
  margin: 2.5rem 0 1rem;
}

.home .main-navigation ul,
.home .site-footer ul {
  list-style: none;
  padding: 0;
}

.home .site-header a,
.home .header-cart {
  text-decoration: none;
}

.home .woocommerce ul.products li.product .woocommerce-loop-product__link {
  text-decoration: none;
  color: inherit;
}

/* Vendors section on homepage */
.home .vendors-grid {
  max-width: 1200px;
  margin: 0 auto 2rem;
}

/* WhatsApp (homepage + footer) */
.tailor-wa-btn,
.tailor-wa-float {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff !important;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tailor-wa-btn:hover,
.tailor-wa-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  color: #fff !important;
}

.hero-buttons .tailor-wa-btn {
  background: rgba(37, 211, 102, 0.9);
}

.tailor-wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
}

/* Reset WordPress / WooCommerce defaults */
.woocommerce ul.products,
.main-navigation ul,
.site-footer ul {
  list-style: none !important;
}

.woocommerce a.button,
.btn {
  text-decoration: none !important;
}

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

@media (max-width: 768px) {
  .main-navigation ul { gap: 0.75rem; }
  .hero-section { min-height: 60vh; }
  .header-inner { justify-content: center; text-align: center; }
  .woocommerce ul.products,
  .home-products ul.products {
    grid-template-columns: 1fr !important;
  }
}
