/* * Apple Store E-commerce Platform - CSS Style Guide
 * Based on the minimalist, invisible interface design philosophy.
 */

:root {
  /* Color Palette - Light Mode (Default) */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --accent-color: #0066CC;
  --accent-hover: #005bb5;
  --card-bg: rgba(255, 255, 255, 0.7);
  
  /* Typography */
  --font-family-display: "Montserrat", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-family-text: "Montserrat", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  
  /* Layout & Spacing */
  --grid-gap: 24px;
  --margin-desktop: 128px;
  --margin-tablet: 64px;
  --margin-mobile: 24px;
  --radius-card-sm: 18px;
  --radius-card-lg: 22px;
  --radius-pill: 999px;
  
  /* Effects */
  --glass-blur: blur(20px);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Color Palette - Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1D1D1F;
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;
    --accent-color: #2997FF; /* Slightly brighter blue for contrast on dark */
    --accent-hover: #0071E3;
    --card-bg: rgba(29, 29, 31, 0.7);
  }
}

/* * Reset & Base Styles 
 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-text);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* * Typography Hierarchy 
 */
.hero-heading {
  font-family: var(--font-family-display);
  font-size: clamp(48px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.section-header {
  font-family: var(--font-family-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.body-copy {
  font-family: var(--font-family-text);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* * Layout & Grid System 
 */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--margin-tablet); }
}

@media (min-width: 1024px) {
  .container { padding: 0 var(--margin-desktop); }
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

/* * Components Architecture 
 */

/* Interactive Cards (Glassmorphism) */
.card {
  background-color: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-card-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-sm {
  border-radius: var(--radius-card-sm);
  padding: 24px;
}

/* Call to Action (CTA) Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-color);
  color: #FFFFFF;
  font-family: var(--font-family-text);
  font-size: 17px;
  font-weight: 400;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #FFFFFF; /* Ensure text stays white on hover */
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--accent-color);
  font-family: var(--font-family-text);
  font-size: 17px;
  font-weight: 400;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-color);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  color: #FFFFFF;
}

/* Product Imagery Isolation Utilities */
.product-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: transparent; /* Rely on isolating shots */
}

.product-image-wrapper img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-image-wrapper:hover img {
  transform: scale(1.03); /* Subtle micro-animation on hover */
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 64px; }
