/* ========================================================================
   Variables
   ====================================================================== */
:root {
  /* Colors */
  --color-background: #f7f8fa;          /* cool, clean backdrop */
  --color-surface: #ffffff;             /* cards, panels */
  --color-text: #1f2933;                /* primary body text */
  --color-text-muted: #6b7280;          /* secondary text */

  --color-primary: #1da4c9;             /* aqua blue accent */
  --color-primary-soft: #e0f6fb;        /* subtle aqua background */
  --color-primary-dark: #0b6b8a;        /* hover/active primary */

  --color-success: #16a34a;             /* confirmations */
  --color-warning: #facc15;             /* warnings */
  --color-danger: #dc2626;              /* errors */

  /* Neutral grays (steel + slate) */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;  /* darker slate */
  --gray-900: #111827;

  /* Ceramic / warm neutrals */
  --color-ceramic: #e3d8c7;            /* ceramic beige for subtle accents */

  /* Semantic background helpers */
  --bg-body: var(--color-background);
  --bg-card: var(--color-surface);
  --bg-header: #101827;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
               sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-heading: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* Shadows (soft, clean, high-res look) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 240ms ease-out;
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   Reset / Normalize
   ====================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

textarea {
  resize: vertical;
}

:where(a) {
  text-decoration: none;
  color: inherit;
}

:where(table) {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================================================
   Base Styles
   ====================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--bg-body);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings: modern, organized hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

h1 {
  font-size: clamp(2rem, 2.5vw, var(--font-size-4xl));
}

h2 {
  font-size: clamp(1.75rem, 2vw, var(--font-size-3xl));
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

p.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

small {
  font-size: var(--font-size-xs);
}

/* Links: clean, trustworthy look */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base),
              opacity var(--transition-fast),
              text-decoration-color var(--transition-base);
}

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

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: var(--space-6) 0;
}

/* ========================================================================
   Accessibility & Focus States
   ====================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Screen-reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ========================================================================
   Utilities
   ====================================================================== */
/* Layout: container for structured, centered content */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  max-width: 1200px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-6);
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Spacing utilities (common) */
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-6 { margin-bottom: var(--space-6); }
.pt-4 { padding-top: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pb-6 { padding-bottom: var(--space-6); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ========================================================================
   Components
   ====================================================================== */
/* Buttons: primary CTA and neutrals */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.1;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #ffffff!important;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast),
              border-color var(--transition-base),
              color var(--transition-base);
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.button:disabled,
button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.button--secondary {
  background-color: #ffffff;
  color: var(--color-text)!important;
  border-color: var(--gray-300);
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
}

.button--ghost {
  background-color: transparent;
  color: var(--color-primary)!important;
  border-color: transparent;
  box-shadow: none;
}

.button--ghost:hover {
  background-color: var(--color-primary-soft);
}

/* Inputs: consistent fields (ideal for product filters, checkout etc.) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), var(--shadow-sm);
}

input:disabled,
select:disabled,
textarea:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
  color: var(--gray-500);
}

/* Cards: used for products, information blocks, support sections */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.card__body {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.card__footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Image wrappers for high-resolution product & interior visuals */
.media-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--gray-200);
}

.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow),
              filter var(--transition-slow);
}

.media-cover:hover img {
  transform: scale(1.03);
}

/* Badges: for stock status, offers, trust markers */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge--success {
  background-color: rgba(22, 163, 74, 0.1);
  color: #166534;
}

.badge--warning {
  background-color: rgba(250, 204, 21, 0.16);
  color: #854d0e;
}

.badge--danger {
  background-color: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.badge--info {
  background-color: rgba(29, 164, 201, 0.12);
  color: var(--color-primary-dark);
}

/* Helper: subtle section background for trust & support areas */
.section--muted {
  background: linear-gradient(135deg, var(--gray-50), #f3f6f9);
}

.section--ceramic {
  background-color: var(--color-ceramic);
}

/* End of base.css */
