/* Modern Design System - Ray's Wood Shed */

/* CSS Variables & Theme Setup */
:root {
  /* Brand Colors from Logo */
  --color-primary: #23588f;         /* Navy Blue */
  --color-primary-light: #4176b6;   /* Slate Blue */
  --color-accent: #d1a13b;          /* Gold / Ochre */
  --color-accent-hover: #b5892c;    /* Darker Gold */
  --color-dark: #0f1c2c;            /* Charcoal / Slate-Black */
  
  /* Neutral Palette */
  --color-bg-light: #fbfaf7;        /* Warm Off-White / Cream */
  --color-bg-card: #ffffff;         /* Pure White */
  --color-border: #e6e3dd;          /* Soft Beige/Gray Border */
  --color-text-dark: #1b2633;       /* Deep Charcoal for Body */
  --color-text-muted: #5c6775;      /* Slate Gray for Descriptions */
  
  /* Fonts */
  --font-header: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 28, 44, 0.04);
  --shadow-md: 0 8px 16px rgba(15, 28, 44, 0.08);
  --shadow-lg: 0 16px 32px rgba(15, 28, 44, 0.12);
  
  /* Animations */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg-light);
}

body {
  font-family: var(--font-body);
  color: var(--color-text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-dark);
}

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

/* Global Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
}

.section-title.text-left::after {
  left: 0;
  transform: none;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* Premium Buttons styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 88, 143, 0.2);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(209, 161, 59, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(251, 250, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-smooth);
  padding: 0.75rem 0;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-dark);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-dark);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Language selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 28, 44, 0.04);
  padding: 4px 12px;
  border-radius: 20px;
}

.lang-divider {
  color: var(--color-border);
  font-size: 0.8rem;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 2px 6px;
}

.lang-btn:hover {
  color: var(--color-primary);
}

.lang-btn.active {
  color: var(--color-primary);
  border-radius: 4px;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 80vh;
  margin-top: 60px;
  display: flex;
  align-items: center;
  background-image: linear-gradient(135deg, rgba(15, 28, 44, 0.9) 0%, rgba(35, 88, 143, 0.85) 100%);
  color: #ffffff;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Fallback color overlay if background pattern is not used */
  background: radial-gradient(circle, transparent 20%, rgba(15,28,44,0.3) 80%);
  z-index: 1;
}

.hero-content-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-content {
  max-width: 650px;
}

.hero-title {
  font-size: 3.5rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Catalog section */
.catalog-section {
  padding: 6rem 0;
  background-color: var(--color-bg-light);
}

/* Filter controls */
.filter-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 0.6rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-sm);
}

.filter-tab:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.filter-tab.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(35, 88, 143, 0.15);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.product-card {
  background-color: var(--color-bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(65, 118, 182, 0.2);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
  background-color: #eae6df;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-price-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 8px rgba(15, 28, 44, 0.15);
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-dark);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.order-btn {
  background-color: transparent;
  border: 1.5px solid var(--color-primary-light);
  color: var(--color-primary);
  padding: 0.6rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: center;
}

.order-btn:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* Meet Ray Section */
.about-section {
  padding: 6rem 0;
  background-color: #ffffff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrapper {
  display: flex;
  justify-content: center;
}

.about-image-frame {
  position: relative;
  width: 100%;
  max-width: 450px;
}

.about-image-frame::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--color-accent);
  z-index: 1;
  border-radius: 8px;
}

.about-image {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 8px;
  z-index: 2;
  box-shadow: var(--shadow-md);
  display: block;
}

.about-content {
  display: flex;
  flex-direction: column;
}

.about-content .divider {
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.about-text {
  font-size: 1.05rem;
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about-text.highlight {
  font-size: 1.25rem;
  font-family: var(--font-header);
  font-style: italic;
  color: var(--color-primary);
  line-height: 1.5;
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}

.workshop-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--color-bg-light);
  padding: 1.25rem;
  border-radius: 6px;
  border-left: 4px solid var(--color-primary);
  margin-top: 1rem;
}

.workshop-badge i {
  font-size: 2rem;
  color: var(--color-primary-light);
}

.workshop-badge strong {
  display: block;
  color: var(--color-dark);
  font-size: 1.05rem;
}

.workshop-badge span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Contact section */
.contact-section {
  padding: 6rem 0;
  background-color: var(--color-bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  margin-top: 2rem;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--color-bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.contact-card:hover {
  transform: translateX(5px);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.contact-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(35, 88, 143, 0.08);
  color: var(--color-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-card:hover .contact-icon-box {
  background-color: var(--color-primary);
  color: #ffffff;
}

.contact-details h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
}

.contact-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.contact-desc-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.location-stamp {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px dashed var(--color-primary-light);
  background-color: rgba(65, 118, 182, 0.03);
  margin-top: 1rem;
}

.location-stamp i {
  color: var(--color-accent);
  font-size: 1.5rem;
  margin-top: 2px;
}

.location-stamp strong {
  display: block;
  color: var(--color-dark);
  font-size: 1.05rem;
}

.location-stamp span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Contact form panel */
.contact-form-panel {
  background-color: var(--color-bg-card);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.form-container {
  padding: 2.5rem;
}

.form-header-title {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.form-header-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--color-accent);
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-color: #faf9f6;
  color: var(--color-text-dark);
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(35, 88, 143, 0.1);
}

.grid-form button[type="submit"] {
  grid-column: span 2;
  margin-top: 1rem;
}

/* Success Card Animation and layout */
.contact-success-box {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon-animation {
  width: 80px;
  height: 80px;
  background-color: rgba(209, 161, 59, 0.1);
  color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0 auto 1.5rem auto;
  border: 3px solid var(--color-accent);
}

.contact-success-box h4 {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.contact-success-box p {
  color: var(--color-text-dark);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Footer Section */
.site-footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem 0;
  border-top: 3px solid var(--color-accent);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 2.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 600px;
  flex-wrap: wrap;
}

.footer-logo {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1) opacity(0.9);
}

.footer-tagline {
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.footer-socials a:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Dialog Native modal styling */
.custom-dialog {
  border: none;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  margin: auto;
  background-color: var(--color-bg-card);
  overflow: hidden;
  padding: 0;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: 
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    overlay 0.3s allow-discrete,
    display 0.3s allow-discrete;
}

.custom-dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@starting-style {
  .custom-dialog[open] {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
}

.custom-dialog::backdrop {
  background-color: rgba(15, 28, 44, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: 
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    overlay 0.3s allow-discrete,
    display 0.3s allow-discrete;
}

.custom-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .custom-dialog[open]::backdrop {
    opacity: 0;
  }
}

.dialog-container {
  padding: 0;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
}

.dialog-heading {
  font-size: 1.5rem;
  color: var(--color-dark);
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
}

.close-modal-btn:hover {
  color: var(--color-dark);
}

.modal-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.selected-product-banner {
  background-color: rgba(35, 88, 143, 0.06);
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  border-radius: 0 4px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.product-badge-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  font-weight: 700;
}

#modal-product-display {
  color: var(--color-primary);
  font-size: 1.15rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Animations */
@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

.hidden-fade {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Responsive design adjustments */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-image-wrapper {
    order: -1;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 1rem;
  }
  
  .navbar {
    position: relative;
    margin-top: 0;
  }
  
  .hero-section {
    margin-top: 0;
    min-height: 60vh;
    padding: 4rem 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .grid-form {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
  
  .grid-form button[type="submit"] {
    grid-column: span 1;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    gap: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
}
