/*
Theme Name: Esskay
Theme URI: https://esskay.co.za
Author: Esskay
Description: Soft-luxury WooCommerce theme for Esskay — personalised gifts, Quran covers and stationery. Dusty-rose palette, Marcellus and Quicksand typography, mihrab-arch product framing.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.6
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: esskay
Tags: e-commerce, custom-logo, custom-menu, featured-images
WC requires at least: 7.0
*/

/* ============================================================
   E S S K A Y — design tokens & base
   ============================================================ */

:root {
  --rose-50:  #faf6f5;
  --rose-100: #f3e1e2;
  --rose-200: #e8dadb;
  --rose-300: #d9bfc0;
  --rose-400: #b08c8e;
  --rose-600: #8d696b;
  --rose-800: #5f4345;
  --ink:      #2e2427;
  --ink-soft: #6b5a5d;
  --paper:    #fffdfc;
  --gold:     #b99a6b;
  --gold-soft:#e9dcc3;

  --font-display: 'Marcellus', Georgia, serif;
  --font-body: 'Quicksand', 'Avenir Next', sans-serif;
  --font-label: 'Montserrat', sans-serif;

  --text-hero: clamp(2.4rem, 1.2rem + 4.6vw, 4.6rem);
  --text-h2: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);

  --space-section: clamp(4rem, 2.5rem + 5vw, 8rem);
  --radius-arch: 999px 999px 20px 20px;
  --radius-card: 18px;

  --shadow-soft: 0 18px 45px -18px rgba(95, 67, 69, 0.28);
  --shadow-lift: 0 26px 60px -20px rgba(95, 67, 69, 0.38);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 300ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 110% -10%, rgba(243, 225, 226, 0.55), transparent 60%),
    radial-gradient(50rem 36rem at -15% 20%, rgba(232, 218, 219, 0.45), transparent 55%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; }

.eyebrow {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose-400);
}

.wrap { position: relative; z-index: 1; width: min(1180px, 92vw); margin-inline: auto; }
.site-content { position: relative; z-index: 1; min-height: 50vh; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute !important;
}

/* ---------- buttons ---------- */
.btn, .button, button[type="submit"], .wp-block-button__link,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce button.button.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.05em 2.2em;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--rose-100);
  cursor: pointer;
  line-height: 1.2;
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              background var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.btn:hover, .button:hover, .woocommerce button.button.alt:hover {
  background: var(--rose-800);
  border-color: var(--rose-800);
  color: var(--rose-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--rose-100); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--rose-400); outline-offset: 3px; }

/* ---------- announcement ---------- */
.announce {
  position: relative;
  z-index: 40;
  background: var(--ink);
  color: var(--rose-100);
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.75em 1em;
}
.announce span { opacity: 0.55; margin-inline: 0.9em; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 253, 252, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rose-200);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 0;
}
.brand { display: flex; align-items: center; gap: 0.8rem; justify-self: start; }
.brand img { height: 54px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 1.9rem; justify-self: center; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 1.9rem; }
.main-nav li { position: relative; display: flex; align-items: center; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.5em 0;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1.5px;
  background: var(--rose-400);
  transition: right var(--duration) var(--ease-out);
}
.main-nav li:hover > a::after,
.main-nav .current-menu-item > a::after { right: 0; }

.main-nav .menu-item-has-children > a::before {
  content: '';
  order: 2;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 7px;
  transition: rotate var(--duration) var(--ease-out);
}
.main-nav .menu-item-has-children:hover > a::before { rotate: 180deg; }

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  translate: -50% 8px;
  min-width: 220px;
  background: var(--paper);
  border: 1px solid var(--rose-200);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  padding: 0.7rem;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease-out), translate var(--duration) var(--ease-out), visibility 0s linear var(--duration);
  flex-direction: column;
  gap: 0;
  z-index: 50;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; translate: -50% 0; transition-delay: 0s;
}
.main-nav .sub-menu li { display: block; }
.main-nav .sub-menu a {
  display: block;
  padding: 0.55em 0.9em;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  line-height: 1.4;
}
.main-nav .sub-menu a::after { display: none; }
.main-nav .sub-menu a:hover { background: var(--rose-100); color: var(--ink); }

.header-icons { display: flex; align-items: center; gap: 0.4rem; justify-self: end; }
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--duration) var(--ease-out);
}
.icon-btn:hover { background: var(--rose-100); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute;
  top: 2px; right: 0;
  min-width: 17px; height: 17px;
  border-radius: 999px;
  background: var(--rose-400);
  color: #fff;
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding-inline: 4px;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

.burger { display: none; }
@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: grid; justify-self: start; }
  .brand { justify-self: center; }
  .brand img { height: 44px; }
}

/* ---------- mobile nav ---------- */
.mobile-nav { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.mobile-nav.open { visibility: visible; }
.mobile-nav .scrim {
  position: absolute; inset: 0;
  background: rgba(46, 36, 39, 0.45);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}
.mobile-nav.open .scrim { opacity: 1; }
.mobile-nav .panel {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: min(320px, 85vw);
  background: var(--paper);
  padding: 2rem 1.6rem;
  overflow-y: auto;
  translate: 100% 0;
  transition: translate 380ms var(--ease-out);
}
.mobile-nav.open .panel { translate: 0 0; }
.mobile-nav .panel ul { list-style: none; }
.mobile-nav .panel a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  padding: 0.45em 0;
  border-bottom: 1px solid var(--rose-100);
}
.mobile-nav .panel .sub-menu a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding-left: 1em;
  color: var(--ink-soft);
}

/* ---------- cart flyout drawer ---------- */
.cart-drawer { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.cart-drawer.open { visibility: visible; }
.cart-drawer .scrim {
  position: absolute; inset: 0;
  background: rgba(46, 36, 39, 0.45);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}
.cart-drawer.open .scrim { opacity: 1; }
.cart-drawer .panel {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: min(420px, 92vw);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  translate: 100% 0;
  transition: translate 380ms var(--ease-out);
}
.cart-drawer.open .panel { translate: 0 0; }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--rose-200);
}
.cart-head h3 { font-size: 1.4rem; }
.cart-drawer .widget_shopping_cart_content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cart-drawer ul.woocommerce-mini-cart {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.6rem;
  margin: 0;
  display: block;
}
.cart-drawer .woocommerce-mini-cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 2rem 0.7rem 0 !important;
  border-bottom: 1px solid var(--rose-100);
}
.cart-drawer .woocommerce-mini-cart-item img {
  width: 74px !important;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--rose-100);
  float: none !important;
  margin: 0 !important;
  grid-column: 1;
  grid-row: 1 / 3;
}
.cart-drawer .woocommerce-mini-cart-item a:not(.remove) {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.cart-drawer .woocommerce-mini-cart-item .quantity {
  grid-column: 2;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--rose-600);
}
.cart-drawer .woocommerce-mini-cart-item a.remove {
  position: absolute !important;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  float: none !important;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--rose-400) !important;
  font-size: 1.2rem;
  line-height: 1;
}
.cart-drawer .woocommerce-mini-cart-item a.remove:hover { background: var(--rose-400); color: #fff !important; }
.cart-drawer .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 1.2rem 1.6rem 0.4rem;
  border-top: 1px solid var(--rose-200);
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.cart-drawer .woocommerce-mini-cart__total .woocommerce-Price-amount { color: var(--rose-600); }
.cart-drawer .woocommerce-mini-cart__buttons {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0.8rem 1.6rem 1.5rem;
}
.cart-drawer .woocommerce-mini-cart__buttons a { width: 100%; }
.cart-drawer .woocommerce-mini-cart__buttons a.checkout { background: var(--rose-400); border-color: var(--rose-400); }
.cart-drawer .woocommerce-mini-cart__empty-message {
  text-align: center;
  color: var(--ink-soft);
  padding: 3rem 1.5rem;
  margin: 0;
}

/* ---------- search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(250, 246, 245, 0.97);
  backdrop-filter: blur(8px);
  display: none;
  padding: 14vh 6vw;
}
.search-overlay.open { display: block; }
.search-overlay form { width: min(680px, 100%); margin-inline: auto; display: flex; gap: 1rem; align-items: end; }
.search-overlay input[type="search"] {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  padding: 0.3em 0;
  color: var(--ink);
  outline: none;
}
.search-close { position: fixed; top: 5vh; right: 6vw; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: var(--space-section);
  background: var(--ink);
  color: var(--rose-100);
  padding: 4.5rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 3rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .wordmark { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: 0.42em; color: #fff; }
.footer-brand p { margin-top: 1rem; font-size: 0.88rem; opacity: 0.75; max-width: 32ch; }
.site-footer h4 {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose-300);
  margin-bottom: 1.1rem;
}
.site-footer ul { list-style: none; display: grid; gap: 0.55rem; }
.site-footer ul a { font-size: 0.9rem; opacity: 0.85; transition: opacity var(--duration), color var(--duration); }
.site-footer ul a:hover { opacity: 1; color: var(--rose-300); }
.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(243, 225, 226, 0.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-size: 0.78rem;
}
.footer-bottom > span { opacity: 0.65; }
.designed-by {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.designed-by span { opacity: 0.55; transition: opacity var(--duration); }
.designed-by:hover span { opacity: 0.9; }
.designed-by img { height: 38px; width: auto; max-width: 150px; object-fit: contain; }

/* ---------- generic page / entry content ---------- */
.page-head { padding: clamp(2.5rem, 5vw, 4.5rem) 0 2rem; text-align: center; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-top: 0.8rem; }
.page-head p { color: var(--ink-soft); max-width: 52ch; margin: 0.8rem auto 0; }
.entry-content { max-width: 68ch; margin-inline: auto; padding-bottom: 2rem; }
.entry-content h2 { font-size: 1.6rem; margin: 2.2rem 0 0.9rem; }
.entry-content h3 { font-size: 1.25rem; margin: 1.8rem 0 0.7rem; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1rem; color: var(--ink-soft); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content blockquote {
  background: var(--rose-100);
  border-left: 3px solid var(--rose-400);
  border-radius: 0 14px 14px 0;
  padding: 1rem 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; translate: 0 26px; transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out); }
.reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; translate: 0 0; }
}
