/*
Theme Name: Sidra Water
Theme URI: https://revised.sidrawater.com
Description: Sidra Water storefront child theme. Design tokens, typography and motion extracted/approved from the Sidra Water design prototype.
Author: Sidra Water
Template: storefront
Version: 1.0.0
Text Domain: sidra-water
*/

/* ---------------------------------------------------
   Fonts (self-hosted, licensed OFL, variable weight)
--------------------------------------------------- */
@font-face {
  font-family: 'Manrope';
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  src: url('assets/fonts/manrope-var.ttf') format('truetype');
}
@font-face {
  font-family: 'Public Sans';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('assets/fonts/publicsans-var.ttf') format('truetype');
}

/* ---------------------------------------------------
   Design tokens
   Confirmed = sampled from brand assets or hardcoded
   in the source prototype. Proposed = filling a gap
   (neutrals, semantic colors) pending real tokens.css.
--------------------------------------------------- */
:root {
  /* brand - confirmed */
  --color-brand-primary: #1865A3;
  --color-brand-primary-hover: #0E4A7D;
  --color-brand-secondary: #1090B0;
  --color-action-primary: #0F7A2E;
  --color-action-primary-hover: #0C5F24;
  --blue-100: #E0F2FE;
  --blue-700: #0369A1;

  /* semantic - proposed */
  --color-success: #0F7A2E;
  --color-success-bg: #E3F6E9;
  --color-error: #DC2626;
  --color-info-bg: #E0F2FE;

  /* neutrals - proposed */
  --color-text-primary: #101B2C;
  --color-text-body: #1E2A3A;
  --color-text-muted: #55677C;
  --color-text-link: var(--color-brand-secondary);
  --color-border-subtle: #E1E8EF;
  --color-border-default: #C7D2DD;
  --color-bg-page: #F5F9FC;
  --color-bg-muted: #EFF4F8;
  --white: #FFFFFF;

  /* shape + elevation - proposed */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(16,27,44,.06);
  --shadow-sm: 0 2px 8px rgba(16,27,44,.08);
  --shadow-md: 0 12px 28px -8px rgba(16,27,44,.22);
  --shadow-brand-sm: 0 8px 20px -10px rgba(24,101,163,.35);

  /* type - proposed pairing */
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
}

/* ---------------------------------------------------
   Base reset (matches the prototype's own base rules)
--------------------------------------------------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--color-bg-page);
  font-family: var(--font-body);
  color: var(--color-text-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-text-link); text-decoration: none; }
a:hover { color: var(--color-brand-primary); }
button { font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }

/* ---------------------------------------------------
   Motion — verbatim from the approved source prototype
--------------------------------------------------- */
@keyframes sw-toast {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes sw-pop {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes sw-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15,122,46,.4); }
  50%      { box-shadow: 0 0 0 10px rgba(15,122,46,0); }
}
.sw-screen { animation: sw-pop .25s ease; }

@media (prefers-reduced-motion: reduce) {
  .sw-screen { animation: none; }
  @keyframes sw-toast { from, to { opacity: 1; transform: none; } }
  @keyframes sw-pop { from, to { opacity: 1; transform: none; } }
  @keyframes sw-pulse { 0%, 50%, 100% { box-shadow: none; } }
}

/* ---------------------------------------------------
   Shared interactive classes (real :hover / animation —
   the source prototype's style-hover="" attribute has no
   real-DOM equivalent, so these classes replace it)
--------------------------------------------------- */
.sw-card {
  transition: transform .15s ease, box-shadow .15s ease;
}
.sw-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-brand-sm);
}
.sw-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: none;
  padding: 13px 24px;
  transition: background .12s ease;
}
.sw-btn-primary { background: var(--color-action-primary); color: #fff; }
.sw-btn-primary:hover { background: var(--color-action-primary-hover); color: #fff; }
.sw-btn-brand { background: var(--color-brand-primary); color: #fff; }
.sw-btn-brand:hover { background: var(--color-brand-primary-hover); color: #fff; }
.sw-btn-outline { background: var(--white); color: var(--color-brand-primary); border: 1px solid var(--color-border-default); }
.sw-btn-outline:hover { background: var(--color-bg-muted); }
.sw-pulse { animation: sw-pulse 2.4s infinite; }

.sw-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--color-text-primary);
  color: #fff;
  padding: 13px 22px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: sw-toast .3s ease;
}

/* ---------------------------------------------------
   WooCommerce structural resets — let our grid/token
   styles win over Storefront's defaults without a full
   template rewrite for every element
--------------------------------------------------- */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}
.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button {
  background: var(--color-action-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
  padding: 12px 22px;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--color-action-primary-hover);
  color: #fff;
}
.woocommerce span.onsale {
  background: var(--color-error);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
}
.woocommerce-checkout #payment {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle) !important;
}
