/* ===================================
   OFF THE WALL PRINTS - MODERN DESIGN SYSTEM
   Inspired by Frameblox minimal aesthetic
   =================================== */

/* Cocogoose Font for Logo */
@font-face {
    font-family: 'Cocogoose';
    src: url('fonts/COCOGOOSE_TRIAL.OTF') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Cocogoose';
    src: url('fonts/COCOGOOSE_PRO_LIGHT-TRIAL.TTF') format('truetype');
    font-weight: 300;
    font-style: normal;
}

:root {
  /* Colors - Modern, clean palette */
  --color-primary: #000000;
  --color-secondary: #1a1a1a;
  --color-accent: #3b82f6;
  --color-text: #0f0f0f;
  --color-text-light: #525252;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f8f8;
  --color-border: #e5e5e5;
  --color-success: #10b981;
  --color-error: #ef4444;
  
  /* Typography - Bold, modern fonts */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing - Condensed */
  --space-xs: 0.2rem;
  --space-sm: 0.375rem;
  --space-md: 0.5rem;
  --space-lg: 0.75rem;
  --space-xl: 1.125rem;
  --space-2xl: 1.5rem;
  --space-3xl: 2rem;
  
  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.text-large {
  font-size: 1.25rem;
  line-height: 1.6;
}

.text-small {
  font-size: 0.875rem;
}

/* ===================================
   LAYOUT COMPONENTS
   =================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1440px;
}

.container-narrow {
  max-width: 960px;
}

.section {
  padding: var(--space-xl) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-lg) 0 var(--space-xl);
  }
}

.section-lg {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
  display: flex;
  gap: var(--space-md);
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.flex-between {
  align-items: center;
  justify-content: space-between;
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
}

.logo {
  font-family: 'Cocogoose', sans-serif;
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 2px;
  color: var(--color-primary);
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.nav-menu a:hover {
  color: var(--color-accent);
  background: rgba(59, 130, 246, 0.1);
}

.nav-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-align: right;
}

.nav-contact a {
  color: var(--color-text);
  font-weight: 500;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  /* Header layout: hamburger left, logo center, contact below */
  .navbar .container {
    display: grid !important;
    grid-template-columns: 48px 1fr 48px;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    gap: var(--space-xs);
    position: relative;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
  
  .mobile-toggle {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  
  .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    text-align: center;
    font-size: 1.1rem;
    white-space: nowrap;
  }
  
  .nav-contact {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    align-items: center !important;
    text-align: center !important;
    flex-direction: column !important;
    gap: 2px !important;
    font-size: 0.7rem;
    padding-top: var(--space-xs);
    line-height: 1.3;
  }
  
  .nav-contact a {
    font-size: 0.75rem;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: 999;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-large {
  padding: 1.125rem 2.25rem;
  font-size: 1.0625rem;
}

.btn-small {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* ===================================
   CARDS
   =================================== */

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
}

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

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.card-description {
  color: var(--color-text-light);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease;
}

.hero h1 {
  animation: fadeInUp 0.6s ease 0.1s backwards;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-light);
  max-width: 600px;
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  animation: fadeInUp 0.6s ease 0.3s backwards;
  flex-wrap: wrap;
}

.hero-image {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 80%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  opacity: 0.1;
  animation: fadeIn 1s ease 0.4s backwards;
}

@media (max-width: 968px) {
  .hero-image {
    opacity: 0.05;
  }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease;
}

/* ===================================
   PRODUCT GRID
   =================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
  border-color: var(--color-accent);
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.product-info {
  padding: var(--space-md);
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.product-description {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ===================================
   FILTERS
   =================================== */

.filters {
  background: var(--color-bg-alt);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.filter-group {
  margin-bottom: var(--space-md);
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  display: block;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
  background: var(--color-secondary);
  color: white;
  padding: var(--space-3xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* ===================================
   UTILITIES
   =================================== */

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

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

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden {
  display: none !important;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  font-size: 1.125rem;
  color: var(--color-text-light);
}

.error-message {
  background: #fee;
  color: var(--color-error);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
}

.success-message {
  background: #efe;
  color: var(--color-success);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
}

/* ===================================
   IMAGE SLIDER
   =================================== */

.hero-slider {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 4/3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slider-slide {
  min-width: 100%;
  position: relative;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: var(--space-lg);
  font-size: 1.125rem;
  font-weight: 600;
}

.slider-controls {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--transition-base);
}

.slider-dot.active {
  background: white;
  transform: scale(1.2);
}

/* ===================================
   PRICING CALCULATOR
   =================================== */

.pricing-calculator {
  background: var(--color-bg-alt);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
}

.calculator-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.calculator-result {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-accent);
  text-align: center;
}

.calculator-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: var(--space-sm) 0;
}

/* ===================================
   PRODUCT DETAIL PAGE
   =================================== */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.product-main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-md);
}

.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.product-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid var(--color-border);
  transition: all var(--transition-base);
}

.product-thumb:hover,
.product-thumb.active {
  border-color: var(--color-accent);
}

.price-indicator {
  display: inline-flex;
  gap: 0.25rem;
  font-size: 1.25rem;
  color: var(--color-accent);
  margin: var(--space-sm) 0;
}

.size-chart {
  margin-top: var(--space-lg);
  overflow-x: auto;
}

.size-chart table {
  width: 100%;
  border-collapse: collapse;
}

.size-chart th,
.size-chart td {
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  text-align: center;
}

.size-chart th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

@media (max-width: 968px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .product-detail > .product-gallery {
    order: 1;
  }
  
  .product-detail > div:not(.product-gallery) {
    order: 2;
  }
  
  .product-gallery {
    position: static;
    margin-bottom: var(--space-md);
  }
  
  .product-main-img {
    aspect-ratio: auto;
    max-height: 350px;
    width: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }
  
  .calculator-inputs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .product-detail {
    gap: var(--space-md);
  }
  
  .product-gallery {
    margin-bottom: var(--space-sm);
  }
  
  .product-main-img {
    max-height: 300px;
  }
}

/* ===================================
   MOBILE RESPONSIVE FIXES
   =================================== */

/* Homepage: Stack hero content on mobile (IMAGE ABOVE text, centered) */
@media (max-width: 768px) {
  .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-xl) !important;
    align-items: center !important;
  }
  
  .hero-slider {
    width: 100% !important;
    max-width: 100% !important;
    order: 1 !important;  /* Image FIRST (above) */
  }
  
  .hero-content {
    max-width: 100% !important;
    order: 2 !important;  /* Text SECOND (below) */
    text-align: center !important;
  }
  
  .hero-buttons {
    justify-content: center !important;
  }
  
  /* Custom Stores page: Stack content on mobile (IMAGE ABOVE text, centered) */
  .storefront-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-xl) !important;
    align-items: center !important;
  }
  
  .storefront-grid > div:first-child {
    order: 2 !important;  /* How It Works SECOND (below) */
  }
  
  .storefront-grid > div:last-child {
    order: 1 !important;  /* Example Storefront FIRST (above) */
    text-align: center !important;
  }
  
  /* Product detail page: Fix image/content overlap */
  .product-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-xl) !important;
  }
  
  .product-gallery {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 1 !important;
    order: 1 !important;
  }
  
  .product-image-main {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  
  .product-info {
    width: 100% !important;
    z-index: 1 !important;
    order: 2 !important;
  }
  
  /* Footer: Stack on mobile */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl) !important;
  }
  
  /* Grid fixes for mobile */
  .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
}

/* Tablet adjustments */
@media (max-width: 968px) and (min-width: 769px) {
  .hero-grid {
    gap: var(--space-xl) !important;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
