/*
Theme Name: Starter Merch
Theme URI: https://starter-merch.local
Description: A premium, conversion-focused WooCommerce theme for merchandise stores. Built for unique and limited-quantity items.
Author: Custom Build
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starter-merch
Template: storefront
*/

/* ==========================================================================
   DESIGN SYSTEM
   ========================================================================== */

:root {
  /* ===== COLOR PALETTE ===== */

  /* Primary - Teal (Tiffanator's Creations brand) */
  --color-primary-50: #f0fdfa;
  --color-primary-100: #ccfbf1;
  --color-primary-200: #99f6e4;
  --color-primary-300: #5eead4;
  --color-primary-400: #2dd4bf;
  --color-primary-500: #14b8a6;
  --color-primary-600: #0d9488;
  --color-primary-700: #0f766e;
  --color-primary-800: #115e59;
  --color-primary-900: #134e4a;

  /* Secondary - Coral/Rose (complements teal beautifully) */
  --color-secondary-50: #fff1f2;
  --color-secondary-100: #ffe4e6;
  --color-secondary-200: #fecdd3;
  --color-secondary-300: #fda4af;
  --color-secondary-400: #fb7185;
  --color-secondary-500: #f43f5e;
  --color-secondary-600: #e11d48;
  --color-secondary-700: #be123c;
  --color-secondary-800: #9f1239;
  --color-secondary-900: #881337;

  /* Neutrals - Cool grays */
  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;
  --color-neutral-950: #020617;

  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;

  /* ===== SEMANTIC ASSIGNMENTS ===== */
  --color-bg: #ffffff;
  --color-bg-alt: var(--color-neutral-50);
  --color-bg-dark: var(--color-neutral-900);
  --color-text: var(--color-neutral-800);
  --color-text-muted: var(--color-neutral-500);
  --color-text-light: #ffffff;
  --color-border: var(--color-neutral-200);
  --color-border-dark: var(--color-neutral-300);

  /* ===== TYPOGRAPHY ===== */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes - Refined scale (smaller, cleaner) */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.8125rem;
  /* 13px */
  --text-base: 0.875rem;
  /* 14px */
  --text-lg: 1rem;
  /* 16px */
  --text-xl: 1.125rem;
  /* 18px */
  --text-2xl: 1.25rem;
  /* 20px */
  --text-3xl: 1.5rem;
  /* 24px */
  --text-4xl: 1.875rem;
  /* 30px */
  --text-5xl: 2.25rem;
  /* 36px */
  --text-6xl: 2.75rem;
  /* 44px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===== SPACING ===== */
  --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 */
  --space-32: 8rem;
  /* 128px */

  /* ===== LAYOUT ===== */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
  --container-padding: var(--space-4);

  /* ===== BORDERS ===== */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  --border-thin: 1px;
  --border-medium: 2px;
  --border-thick: 4px;

  /* ===== SHADOWS ===== */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* ===== TRANSITIONS ===== */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;

  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ===== Z-INDEX ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-neutral-900);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

a:hover {
  color: var(--color-primary-700);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Selection */
::selection {
  background-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-sm {
  max-width: var(--container-sm);
}

.container-md {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-lg);
}

.container-2xl {
  max-width: var(--container-2xl);
}

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-primary-600);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-error {
  color: var(--color-error);
}

.font-light {
  font-weight: var(--font-light);
}

.font-normal {
  font-weight: var(--font-normal);
}

.font-medium {
  font-weight: var(--font-medium);
}

.font-semibold {
  font-weight: var(--font-semibold);
}

.font-bold {
  font-weight: var(--font-bold);
}

/* Spacing Utilities */
.mt-0 {
  margin-top: 0;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.py-12 {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

/* Display */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

/* Flexbox */
.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;
}

.justify-end {
  justify-content: flex-end;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

/* Visibility */
.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;
}

/* ==========================================================================
   COMPONENT STYLES
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  text-align: center;
  text-decoration: none;
  border: var(--border-medium) solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-700) 100%);
  color: white;
  border-color: var(--color-primary-600);
  box-shadow: var(--shadow-sm), 0 0 0 0 var(--color-primary-500);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-primary-600) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary-500) 0%, var(--color-secondary-600) 100%);
  color: white;
  border-color: var(--color-secondary-500);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--color-secondary-400) 0%, var(--color-secondary-500) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--color-primary-600);
  border-color: var(--color-primary-600);
}

.btn-outline:hover {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-neutral-100);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* Cards */
.card {
  background: var(--color-bg);
  border: var(--border-thin) solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-in-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-body {
  padding: var(--space-6);
}

.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: var(--border-thin) solid var(--color-border);
  background: var(--color-bg-alt);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: var(--border-thin) solid var(--color-border);
  background: var(--color-bg-alt);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.badge-primary {
  background: var(--color-primary-100);
  color: var(--color-primary-700);
}

.badge-secondary {
  background: var(--color-secondary-100);
  color: var(--color-secondary-700);
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-error {
  background: var(--color-error-light);
  color: var(--color-error);
}

.badge-dark {
  background: var(--color-neutral-900);
  color: white;
}

/* Sold Badge - Special */
.badge-sold {
  background: var(--color-neutral-800);
  color: white;
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 10;
}

/* Unique Item Badge */
.badge-unique {
  background: linear-gradient(135deg, var(--color-secondary-400), var(--color-secondary-600));
  color: white;
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 10;
}

/* Stock Warning */
.stock-warning {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-error);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.stock-warning::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-error);
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6) 0;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.trust-badge svg {
  width: 20px;
  height: 20px;
  color: var(--color-success);
}

/* Price Display */
.price {
  font-weight: var(--font-bold);
  color: var(--color-neutral-900);
}

.price-lg {
  font-size: var(--text-2xl);
}

.price-xl {
  font-size: var(--text-3xl);
}

.price del {
  color: var(--color-text-muted);
  font-weight: var(--font-normal);
  margin-right: var(--space-2);
}

.price ins {
  text-decoration: none;
  color: var(--color-error);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-neutral-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--border-thin) solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-100);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-neutral-400);
}

/* Section Dividers */
.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-muted);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-8) 0;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}