/*
Theme Name: Shaallow Child
Template: shaallow
Version: 1.2.8
Description: Header slim, full width, dark blue background, pill search with soft glow, Hi/Login label with ellipsis, icon-only cart + dark auth screen with under-glow.
*/

/* ============ Variables & Typography ============ */
:root{
  --header-base-hex: #1A2344;
  --header-border: rgba(48,61,219,.87);
  --search-bg: #233953;

  --text: #ffffff;
  --muted: #9CA3AF;
  --blue: #3B82F6;
  --blue-soft: rgba(59,130,246,.20);
  --green: #34D399;

  --hdr-h: 46px;
  --btn-h: 32px;
  --icon: 18px;
  --gap: 6px;
}

.site-header,
.site-header *{
  font-family: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
  letter-spacing: 0;
  box-sizing: border-box;
}

/* Auth screens use same typography */
body.woocommerce-account:not(.logged-in),
body.woocommerce-account:not(.logged-in) *{
  font-family: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
}

/* ============ Header container ============ */
.wp-site-blocks > header.site-header{ margin-top: 0; }

.site-header.glass.alignfull{
  position: sticky; top: 0; z-index: 50;
  width: 100%; margin: 0; padding: 0;
  background: var(--header-base-hex) !important;
  background-image: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 8px 18px rgba(59,130,246,.14);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.glass.alignfull:hover{
  box-shadow:
    0 10px 24px var(--blue-soft),
    0 12px 28px rgba(255,255,255,.10);
}

/* Admin bar fix */
.admin-bar .site-header.alignfull{ top: 32px; }
@media (max-width: 782px){
  .admin-bar .site-header.alignfull{ top: 46px; }
}

/* ============ Internal layout ============ */
.site-header .rail{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: var(--hdr-h);
  gap: var(--gap);
  padding: 2px 10px 2px 0;
}

/* ============ Site logo ============ */
.site-header .wp-block-site-logo{
  display:flex; align-items:center;
  margin: 0 6px 0 0 !important;
}
.site-header .wp-block-site-logo img{
  height: 40px; width: auto; display:block;
  transform: translateY(-0.5px);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.site-header .wp-block-site-logo + .brand-fallback{ display:none; }

/* ============ Brand fallback ============ */
.brand{ color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; }
.brand-gradient{
  background: linear-gradient(90deg, #60A5FA 0%, var(--green) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.edge-left{ margin-left: 0; padding-left: 0; }

/* ============ Search ============ */
.searchbar{
  display:flex; align-items:center; gap:6px;
  width: 100%; max-width: 700px;
  height: var(--btn-h);
  background: var(--search-bg);
  border: 1px solid var(--header-border);
  border-radius: 9999px;
  padding: 1px 4px 1px 10px;
  margin: 0;
  box-shadow: 0 0 0 0 transparent;
  filter: drop-shadow(0 8px 18px rgba(255,255,255,.06)) drop-shadow(0 22px 46px rgba(59,130,246,.10));
  transition: border-color .2s ease, box-shadow .2s ease, filter .2s ease;
  overflow: hidden;
}
.searchbar:hover{
  filter: drop-shadow(0 10px 22px rgba(255,255,255,.08)) drop-shadow(0 28px 54px rgba(59,130,246,.12));
}
.searchbar:focus-within{
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(255,255,255,.06);
  filter: drop-shadow(0 12px 28px rgba(255,255,255,.12)) drop-shadow(0 34px 62px rgba(59,130,246,.16));
}
.searchbar input[type="search"]{
  flex: 1; height: calc(var(--btn-h) - 6px);
  padding: 2px 6px; border: none; outline: none;
  background: transparent !important; color: var(--text);
  font-size: .95rem; -webkit-appearance: none; appearance: none;
  border-radius: 9999px; padding-right: 28px;
}
.searchbar input::placeholder{ color: var(--muted); }

/* Clear (X) */
.searchbar input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance: none; appearance: none;
  height: 14px; width: 14px; margin-right: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'><path d='M6 6l12 12M18 6l-12 12'/></svg>") no-repeat center / 14px 14px;
  cursor: pointer; opacity: .95;
}
.searchbar input[type="search"]::-ms-clear{ display:none; width:0; height:0; }

/* Autofill fix */
.searchbar input:-webkit-autofill,
.searchbar input:-webkit-autofill:hover,
.searchbar input:-webkit-autofill:focus{
  box-shadow: 0 0 0 1000px var(--search-bg) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  border-radius: 9999px !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* ============ Actions ============ */
.actions{ display:flex; align-items:center; gap:6px; }
.actions > *{ display:inline-flex; align-items:center; }

.action, .btn-ghost, .btn-icon{
  display:inline-flex; align-items:center; justify-content:center;
  height: var(--btn-h); padding: 4px 8px;
  color: var(--text); text-decoration: none;
  background: transparent; border: 1px solid transparent;
  border-radius: 9999px; cursor: pointer; line-height: 1;
  transition: color .2s ease, box-shadow .2s ease, transform .1s ease;
}
.btn-icon{ padding: 4px; }
.action:hover, .btn-ghost:hover, .btn-icon:hover{
  color:#E5E7EB; box-shadow: 0 0 14px rgba(255,255,255,.08);
}
.action:active{ transform: translateY(.5px); }

.action .icon{ display:inline-flex; align-items:center; justify-content:center; }

/* Avoid cropped descenders */
.action .label{
  display:inline-flex; align-items:center;
  font-size:.95rem; font-weight:600; line-height:1.25 !important;
  padding-bottom:1px;
}

/* SVG sizing */
.icon svg, .action svg, .btn-icon svg{ width: var(--icon); height: var(--icon); display:block; transform: translateY(-0.5px); }
.action.orders .icon svg{ transform: translateY(-1px); }

/* Account label ellipsis */
.action.account .label{
  min-width: 0; max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* Cart: icon-only safeguard */
.action.cart .label{ display:none !important; }

/* ============ Language dropdown (if used) ============ */
.lang{ position: relative; }
.lang[open] .lang-menu{ display:block; }
.lang-menu{
  display:none; position:absolute; right:0; top:110%;
  background:#0F172A; border:1px solid #25304a;
  border-radius:12px; padding:6px; min-width:180px;
  box-shadow: 0 12px 24px rgba(0,0,0,.35);
}
.lang-menu a{ display:block; padding:8px 10px; color: var(--text); text-decoration:none; border-radius:8px; }
.lang-menu a:hover{ background:#1F2937; }

/* ============ Cart badge pulse ============ */
.action.cart{ position: relative; }
.badge-pulse{
  position:absolute; top:-4px; right:-6px;
  min-width:16px; height:16px; padding:0 6px;
  display:flex; align-items:center; justify-content:center;
  background:#3B82F6; color:#fff; font-size:11px;
  border-radius:9999px; animation: pulse 1.2s infinite ease-out;
}
@keyframes pulse{
  0% { box-shadow:0 0 0 0 rgba(59,130,246,.6); }
  70%{ box-shadow:0 0 0 8px rgba(59,130,246,0); }
  100%{ box-shadow:0 0 0 0 rgba(59,130,246,0); }
}

/* ============ Second search bar (mobile) ============ */
.md-show{ display:flex; }
.md-hide{ display:none; margin: 8px 12px; }
@media (min-width: 769px){ .md-hide{ display:none !important; } }
@media (max-width: 900px){
  .site-header .rail{ grid-template-columns: auto auto 1fr; gap: 10px; }
}
@media (max-width: 768px){
  :root{ --hdr-h: 44px; --btn-h: 30px; --icon: 16px; }
  .md-show{ display:none; }
  .md-hide{ display:flex; }
  .brand{ font-size: 1.3rem; }
  .actions .label{ display:none; }
}

/* ============ Suggestions (Woo/jQuery UI) ============ */
.ui-autocomplete{
  background: rgba(15,23,42,.95);
  backdrop-filter: blur(8px);
  border: 1px solid #25304a;
  border-radius: 12px;
  padding: 6px;
}
.ui-autocomplete .ui-menu-item-wrapper{ padding: 8px 10px; border-radius: 9999px; }
.ui-autocomplete .ui-menu-item-wrapper:hover{ background: rgba(255,255,255,.08); }
.wc-block-product-search__suggestions,
.wc-block-product-search__dropdown{
  background: rgba(15,23,42,.95);
  border: 1px solid #25304a;
  border-radius: 12px;
  padding: 4px;
  backdrop-filter: blur(8px);
}
.wc-block-product-search__suggestion,
.wc-block-product-search__recent-item{
  border-radius: 9999px; padding: 8px 10px;
}
.wc-block-product-search__suggestion:hover,
.wc-block-product-search__recent-item:hover{ background: rgba(255,255,255,.08); }

/* Woo search field block */
.wp-block-woocommerce-product-search .wc-block-product-search__field{
  height: var(--btn-h);
  border-radius: 9999px;
  background: var(--search-bg);
  color: var(--text);
  border: 1px solid var(--header-border);
  padding: 6px 10px 6px 12px;
}
.wp-block-woocommerce-product-search .wc-block-product-search__field::placeholder{ color: var(--muted); }
.wp-block-woocommerce-product-search:focus-within .wc-block-product-search__field{
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(255,255,255,.10);
}

/* ======================================================================
   ===================  WOO – DARK LOGIN / REGISTER  ====================
   ====================================================================== */

/* Remove page title & white bands on My Account (logged-out) */
body.woocommerce-account:not(.logged-in) .entry-title,
body.woocommerce-account:not(.logged-in) .wp-block-post-title,
body.woocommerce-account:not(.logged-in) .page-title{ display:none !important; }

/* Hide header & footer for full-screen auth */
body.woocommerce-account:not(.logged-in) .site-header,
body.woocommerce-account:not(.logged-in) .site-footer,
body.woocommerce-account:not(.logged-in) .wp-site-blocks > header,
body.woocommerce-account:not(.logged-in) .wp-site-blocks > footer{ display:none !important; }

/* Remove layout paddings */
body.woocommerce-account:not(.logged-in) .wp-site-blocks{ padding:0 !important; margin:0 !important; }

/* Same background color as header */
html,
body.woocommerce-account:not(.logged-in){
  background: var(--header-base-hex) !important;
}

/* Full-screen wrapper */
.sha-auth-screen{
  min-height: 100vh;
  padding: 48px 20px;
  display:flex; align-items:center; justify-content:center;
  background: var(--header-base-hex);
}

/* Card */
.sha-auth-card{
  width: 520px; max-width: 94vw;
  background: #1f2937;
  border-radius: 18px;
  padding: 32px;
  /* depth + soft blue halo */
  box-shadow:
    0 12px 24px rgba(0,0,0,.38),
    0 30px 80px rgba(59,130,246,.28);
  color: #fff;
  position: relative;
  z-index: 0;
}
.sha-auth-card h1{
  margin: 0 0 16px; text-align: center;
  font-size: 36px; line-height: 1.2; color: #fff;
}

/* Brand logo under the H1 (only sign-in) */
.sha-auth-brand-wrap{ text-align: center; margin: 0 0 12px; }
.sha-auth-brand{ height: 24px; width: auto; display: inline-block; }

/* Neutralize borders inside the card */
.sha-auth-card .woocommerce-form,
.sha-auth-card fieldset{ border: none !important; background: transparent !important; box-shadow: none !important; }
.sha-auth-card legend{ display:none !important; }

/* Hide any internal H2 (Login/Register) */
.sha-auth-card h2{ display:none !important; }

/* Inputs */
.sha-auth-card .input-text{
  width: 100%;
  background: #374151;
  border: 1px solid #4b5563;
  padding: 14px 16px;
  border-radius: 10px;
  color: #e5e7eb;
  outline: none;
}
.sha-auth-card .input-text:focus{
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,.20);
}

/* Primary button */
.sha-auth-card .button{
  width: 100%; height: 48px;
  border-radius: 12px; border: 0;
  font-size: 18px; font-weight: 600;
  background: #2563eb; color: #fff;
  cursor: pointer;
}
.sha-auth-card .button:hover{ filter: brightness(1.06); }

/* Forgot password link */
.sha-auth-card .woocommerce-LostPassword{
  display:block !important;
  margin-top: 10px;
  text-align: center;
}
.sha-auth-card .woocommerce-LostPassword a{
  color: #cbd5e1; text-decoration: none;
}
.sha-auth-card .woocommerce-LostPassword a:hover{
  color: #e5e7eb; text-decoration: underline;
}

/* Alt links under the card */
.sha-auth-alt{
  margin-top: 14px; text-align: center;
  color: #9ca3af; font-size: 14px;
}
.sha-auth-alt a{ color: #34d399; text-decoration: none; }
.sha-auth-alt a:hover{ text-decoration: underline; }

/* Legal note (register view) */
.sha-auth-legal{
  margin: 6px 0 0;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}
.sha-auth-legal a{ color: #9ecaff; text-decoration: none; }
.sha-auth-legal a:hover{ text-decoration: underline; }

/* Keep "Remember me" hidden for a clean UI */
.woocommerce-form-login__rememberme{ display:none !important; }
/* Keep labels hidden; we rely on placeholders */
.woocommerce-form-login label,
.woocommerce-form-register label{ display:none !important; }

/* White-Blue UNDERGLOW under the card */
.sha-auth-card::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -36px;
  transform: translateX(-50%);
  width: min(92%, 580px);
  height: 140px;
  background: radial-gradient(
    60% 120px at 50% 0,
    rgba(255,255,255,.25),
    rgba(59,130,246,.28) 38%,
    rgba(59,130,246,0) 70%
  );
  filter: blur(22px);
  opacity: .95;
  pointer-events: none;
  z-index: -1;
}

/* ---------- REGISTER VIEW ONLY ---------- */
/* Hide the Login column and expand Register */
.register-view .u-column1 { display:none !important; }
.register-view .u-column2 { width:100% !important; float:none !important; }

/* Hide Woo's empty paragraph when we suppress the password message */
.register-view .woocommerce-form-register p.form-row:empty{ display:none !important; }

/* Hide Woo privacy paragraph (keep our legal line) */
.register-view p.woocommerce-privacy-policy-text{ display:none !important; }

/* Create account: acercar textos al botón Register */
.register-view .sha-auth-card .woocommerce-form-register p.form-row{
  margin: 10px 0;
}

/* ======================================================================
   ===================  WOO – MY ACCOUNT (SINGLE COLUMN)  ===============
   ====================================================================== */

/* Variables locales para My Account */
:root{
  --sh-bg:#0f172a0d;            /* fondo sutil */
  --sh-card:#ffffff;
  --sh-txt:#0f172a;
  --sh-muted:#6b7280;
  --sh-brand:#6D28D9;           /* morado de marca/CTA */
  --sh-danger:#ef4444;
  --sh-br:14px;
  --sh-gap:22px;
  --sh-bd:1px solid #e5e7eb;
  --sh-shadow:0 10px 30px rgba(2,6,23,.06);
}

/* Contenedor principal (una columna) */
.sh-account--single{
  max-width: 980px;
  margin: 28px auto 64px;
  padding: 0 18px;
}
.sh-account__content{ min-height: 420px; }

/* Header con saludo */
.sh-dash__header{
  display:flex; align-items:center; gap:14px;
  background: var(--sh-card); border: var(--sh-bd);
  border-radius: var(--sh-br); padding:16px; box-shadow: var(--sh-shadow);
  margin-bottom: 16px;
}
.sh-dash__avatar{ border-radius:50%; }
.sh-dash__title{ margin:0; font-size:22px; color: var(--sh-txt); }
.sh-dash__sub{ margin:4px 0 0; color: var(--sh-muted); }

/* Grid de tarjetas */
.sh-dash__grid{
  display:grid; gap: var(--sh-gap);
  grid-template-columns: repeat(2,minmax(0,1fr));
}
@media (max-width: 720px){
  .sh-dash__grid{ grid-template-columns: 1fr; }
}

/* Tarjeta base */
.sh-card{
  display:grid; gap:6px; align-content:start;
  background: var(--sh-card); border: var(--sh-bd);
  border-radius: var(--sh-br); padding:16px;
  text-decoration:none; color: var(--sh-txt);
  box-shadow: var(--sh-shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.sh-card:hover{ transform: translateY(-1px); box-shadow: 0 14px 36px rgba(2,6,23,.09); }
.sh-card__icon{ width:36px; height:36px; display:grid; place-items:center; background: var(--sh-bg); border-radius:10px; }
.sh-card__title{ font-weight:600; }
.sh-card__meta{ color: var(--sh-muted); font-size:13px; }

/* Estados */
.sh-card--danger .sh-card__icon{ background: rgba(239,68,68,.08); }
.sh-card--danger{ border-color: rgba(239,68,68,.35); }

.sh-card--cta .sh-card__icon{ background: rgba(109,40,217,.10); }
.sh-card--cta{ border-color: rgba(109,40,217,.30); }
