/*
Theme Name:   Notes De Parfums
Theme URI:    https://notesdeparfums.com
Description:  Custom WooCommerce child theme for Notes De Parfums. Editorial, minimal-luxury
              aesthetic (Jost + Instrument Sans, cream/brown palette). Child of Storefront.
Author:       Notes De Parfums
Template:     storefront
Version:      2.1.0
Text Domain:  notesdeparfums
*/

/* =========================================================================
   Brand design tokens
   ========================================================================= */
:root {
  --ndp-cream:   #fff7f0;
  --ndp-beige:   #f4e9e2;
  --ndp-taupe:   #d9cec7;
  --ndp-brown:   #6b4930;
  --ndp-brown-d: #543822;
  --ndp-ink:     #3a2a1d;
  --ndp-white:   #ffffff;
  --ndp-font-heading: "Jost", sans-serif;
  --ndp-font-body:    "Instrument Sans", sans-serif;
  --ndp-maxw: 1200px;
}

/* =========================================================================
   Global
   ========================================================================= */
body, .site {
  background-color: var(--ndp-cream);
  font-family: var(--ndp-font-body);
  color: var(--ndp-ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.site-title, .page-title,
.woocommerce-loop-product__title, .product_title {
  font-family: var(--ndp-font-heading);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ndp-brown);
  line-height: 1.2;
}
a { color: var(--ndp-brown); text-decoration: none; }
a:hover { color: var(--ndp-brown-d); }

.ndp-eyebrow {
  font-family: var(--ndp-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--ndp-brown);
  opacity: 0.65;
  margin: 0 0 0.9rem;
}
.ndp-link {
  font-family: var(--ndp-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* Buttons */
.ndp-btn,
button, input[type="button"], input[type="submit"], .button, .added_to_cart,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt,
.woocommerce button.button.alt, .woocommerce input.button.alt {
  display: inline-block;
  background-color: var(--ndp-brown);
  color: var(--ndp-cream);
  border: 1px solid var(--ndp-brown);
  border-radius: 2px;
  padding: 0.85em 2em;
  font-family: var(--ndp-font-heading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: all 0.25s ease;
}
.ndp-btn:hover,
.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover, .woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover {
  background-color: var(--ndp-brown-d);
  color: var(--ndp-white);
  border-color: var(--ndp-brown-d);
}

/* =========================================================================
   Header — centered logo + centered nav (desktop) / clean dropdown (mobile)
   ========================================================================= */
.site-header {
  background-color: var(--ndp-cream);
  border-bottom: 1px solid var(--ndp-taupe);
  padding: 1.1em 0 0.6em;
}
/* Center the logo */
.site-header .col-full { display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.site-branding { float: none !important; margin: 0 !important; text-align: center; width: 100%; }
.site-header .custom-logo-link { display: inline-block; }
.site-header .custom-logo,
.site-header .custom-logo-link img { max-height: 84px; width: auto; margin: 0 auto; }
.site-header .site-search,
.storefront-handheld-footer-bar { display: none; }

/* Navigation bar */
.storefront-primary-navigation { background: var(--ndp-cream); border-bottom: 1px solid var(--ndp-taupe); }
.storefront-primary-navigation .col-full { position: relative; display: flex; justify-content: center; align-items: center; }
.main-navigation { float: none !important; width: auto; }

/* Desktop menu: centered, inline */
.primary-navigation ul.menu { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; }
.primary-navigation ul li { float: none !important; display: block; }
.main-navigation a {
  font-family: var(--ndp-font-heading);
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.85rem;
  color: var(--ndp-brown); padding: 0.6em 1.1em;
}
#site-header-cart { position: absolute; right: 0; top: 50%; transform: translateY(-50%); float: none; margin: 0; }
#site-header-cart .cart-contents { color: var(--ndp-brown); }

/* Custom primary navigation (replaces Storefront's) — own classes, no conflicts */
.ndp-nav { width: 100%; }
.ndp-nav__menu {
  display: flex; flex-wrap: wrap; justify-content: center;
  list-style: none; margin: 0; padding: 0;
}
.ndp-nav__menu li { margin: 0; float: none; }
.ndp-nav__menu a {
  display: block;
  font-family: var(--ndp-font-heading);
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.85rem;
  color: var(--ndp-brown); padding: 0.6em 1.1em;
}
.ndp-nav__menu a:hover { color: var(--ndp-brown-d); }
@media (max-width: 767px) {
  .ndp-nav__menu {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ndp-nav__menu a { font-size: 0.8rem; letter-spacing: 0.05em; padding: 0.6em 0.65em; white-space: nowrap; }
}

/* Mobile hamburger button */
.menu-toggle {
  font-family: var(--ndp-font-heading);
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  background: var(--ndp-brown) !important; color: var(--ndp-cream) !important;
  border: none; border-radius: 2px; padding: 0.7em 1.6em; margin: 0 auto;
}
/* Mobile dropdown: clean stacked links */
.handheld-navigation ul.menu { display: block; }
.handheld-navigation ul li { display: block; float: none; border-top: 1px solid var(--ndp-taupe); }
.handheld-navigation ul li a { display: block; text-align: center; padding: 0.95em; }

@media (max-width: 767px) {
  .storefront-primary-navigation .col-full { flex-direction: column; }
  /* Show the same inline menu as desktop on mobile (no hamburger) */
  .menu-toggle { display: none !important; }
  .handheld-navigation { display: none !important; }
  html body .main-navigation .primary-navigation {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    width: 100%;
  }
  /* Readable single row; scrolls horizontally if it doesn't all fit */
  html body .primary-navigation ul.menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  html body .primary-navigation ul.menu > li { display: block !important; float: none !important; flex: 0 0 auto; }
  html body .primary-navigation ul.menu > li > a {
    display: block !important;
    font-size: 3.4vw;
    letter-spacing: 0.04em;
    padding: 0.7em 0.7em;
    white-space: nowrap;
  }
  #site-header-cart { position: static; transform: none; margin-top: 0.4em; text-align: center; }
}

/* =========================================================================
   Homepage
   ========================================================================= */
.ndp-home { margin: 0; }
.ndp-home .ndp-section { max-width: var(--ndp-maxw); margin: 0 auto; padding: 5.5rem 1.5rem; text-align: center; }
.ndp-section__head { margin-bottom: 2.8rem; }
.ndp-section__title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0; }
.ndp-section__more { margin-top: 2.6rem; }

/* Hero — split: text + product image, fills the first screen */
.ndp-hero {
  background: linear-gradient(180deg, var(--ndp-cream) 0%, var(--ndp-beige) 100%);
  border-bottom: 1px solid var(--ndp-taupe);
}
.ndp-hero__inner {
  max-width: var(--ndp-maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  min-height: 70vh;
}
.ndp-hero__text { text-align: left; }
.ndp-hero__title { font-size: clamp(2.1rem, 4vw, 3.4rem); margin: 0 0 1.2rem; }
.ndp-hero__sub { font-size: 1.12rem; color: var(--ndp-brown); opacity: 0.85; margin: 0 0 2.2rem; }
.ndp-hero__media { text-align: center; }
.ndp-hero__media img {
  max-height: 58vh;
  width: auto; max-width: 100%;
  object-fit: contain;
}

/* Product grid + cards */
.ndp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.ndp-card { display: block; text-align: center; }
.ndp-card__media {
  background: transparent;
  border: none;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease;
}
.ndp-card:hover .ndp-card__media { transform: translateY(-5px); }
.ndp-card__media img { width: 100%; height: 100%; object-fit: contain; }
.ndp-card__title { font-size: 1.18rem; margin: 0 0 0.35rem; color: var(--ndp-ink); }
.ndp-card__price { color: var(--ndp-brown-d); font-weight: 600; }

/* Category tiles */
.ndp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ndp-tile {
  position: relative;
  min-height: 460px;
  background-size: cover;
  background-position: center;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.ndp-tile__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(58,42,29,0) 35%, rgba(58,42,29,0.6) 100%);
  transition: background 0.35s ease;
}
.ndp-tile:hover .ndp-tile__overlay { background: linear-gradient(180deg, rgba(58,42,29,0.15) 0%, rgba(58,42,29,0.7) 100%); }
.ndp-tile__label {
  position: relative; z-index: 2;
  color: #fff;
  font-family: var(--ndp-font-heading);
  font-size: 2rem;
  letter-spacing: 0.04em;
  padding-bottom: 2.6rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.ndp-tile__cta {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.95;
  border-bottom: 1px solid rgba(255,255,255,0.7); padding-bottom: 2px;
}

/* Story */
.ndp-story { max-width: 760px; }
.ndp-story__text { font-size: 1.12rem; color: var(--ndp-brown); margin: 0 0 1.8rem; }

/* =========================================================================
   Shop / archive / product polish
   ========================================================================= */
/* Equal-height catalog cards on a grid so prices + buttons align across a row */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  margin: 0 0 2rem;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; display: none !important; }
.woocommerce ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
  background: transparent;
  padding: 0.5rem;
  border: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.woocommerce ul.products li.product:hover { transform: translateY(-5px); }
/* Reserve two lines for titles so single-line names don't shift the price up */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.18rem;
  line-height: 1.35;
  min-height: 2.7em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Push the add-to-cart button to the bottom of every card */
.woocommerce ul.products li.product .price { margin-bottom: 0.75rem; }
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart { margin-top: auto; }
/* Frameless, full-bottle transparent catalog images */
.woocommerce ul.products li.product a img {
  background: transparent;
  border: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-bottom: 1rem;
}
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price, .woocommerce div.product span.price {
  color: var(--ndp-brown-d); font-weight: 600;
}
.woocommerce span.onsale { background-color: var(--ndp-brown); color: var(--ndp-cream); }
.storefront-breadcrumb, .woocommerce-breadcrumb { color: var(--ndp-brown); opacity: 0.7; }
.page-title, .woocommerce-products-header__title { text-align: center; }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], textarea, select {
  border: 1px solid var(--ndp-taupe); background: var(--ndp-white); border-radius: 2px;
}

/* Footer */
.site-footer { background-color: var(--ndp-brown); color: var(--ndp-cream); text-align: center; }
.site-footer a { color: var(--ndp-cream); }
.site-footer a:hover { color: var(--ndp-white); }
.ndp-footer-nav { margin-bottom: 1.1rem; }
.ndp-footer-menu { list-style: none; margin: 0; padding: 0; }
.ndp-footer-menu li { display: inline-block; margin: 0.3rem 0.9rem; }
.ndp-footer-menu a {
  font-family: var(--ndp-font-heading);
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
}
.site-footer .site-info { opacity: 0.85; font-size: 0.85rem; }

/* Notices */
.woocommerce-message, .woocommerce-info { border-top-color: var(--ndp-brown); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--ndp-brown); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .ndp-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .ndp-tiles { grid-template-columns: 1fr; }
  .ndp-tile { min-height: 340px; }
  .ndp-home .ndp-section { padding: 3.5rem 1.2rem; }
  .ndp-hero__inner { grid-template-columns: 1fr; text-align: center; min-height: auto; padding: 3rem 1.2rem; }
  .ndp-hero__text { text-align: center; }
  .ndp-hero__media { order: -1; }
}
@media (max-width: 480px) {
  .ndp-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem; }
}
