/* ==========================================================================
   Responsive Styles - Mobile-First Approach
   ========================================================================== */

/* ==========================================================================
   Mobile Styles (Base - < 640px)
   ========================================================================== */

/* These styles are the default and will be overridden by larger breakpoints */

/* Extra Small Mobile Screens */
@media (max-width: 639px) {
  /* Hide specific masonry items on small mobile */
  #hero-nangali-vase,
  #hero-masama-bowl {
    display: none;
  }

  /* Hide about section image on mobile */
  .about__image {
    display: none;
  }

  /* Hide custom section image on mobile */
  .custom-products__image {
    display: none;
  }
}

/* Mobile Navigation */
@media (max-width: 767px) {
  .nav__toggle {
    display: flex;
  }

  .nav__list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl) var(--space-xl);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: var(--z-modal);
    gap: var(--space-md);
  }

  .nav__list.active {
    right: 0;
  }

  .nav__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    padding: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
  }

  .nav__close:hover {
    background-color: rgba(72, 44, 12, 0.1);
    transform: rotate(90deg);
  }

  .nav__close:active {
    transform: rotate(90deg) scale(0.95);
  }

  .nav__link {
    font-size: var(--font-size-md);
    width: 100%;
    padding: var(--space-sm) 0;
  }

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: calc(var(--z-modal) - 1);
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Hero Section */
  .hero {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
  }

  .hero__content {
    margin-bottom: var(--space-xl);
  }

  /* Masonry Grid - Single column on mobile */
  .masonry-sizer,
  .masonry-item {
    width: 100%;
  }

  /* Tall vase adjusts to normal height on mobile */
  .masonry-card--tall img {
    height: 400px;
  }

  /* About Section */
  .about {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
  }

  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about__image {
    order: -1;
  }

  /* Custom Products Section */
  .custom-products {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
  }

  .custom-products__content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .custom-products__image {
    order: -1;
  }

  /* Products Section */
  .products {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
  }

  .product-category {
    margin-bottom: var(--space-2xl);
  }

  .product-card img {
    height: 200px;
  }

  /* Process Section */
  .process {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
  }

  .process__steps {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
  }

  .process-step {
    padding: var(--space-lg);
  }

  /* Contact Section */
  .contact {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
  }

  .contact__intro {
    margin-bottom: var(--space-xl);
  }

  .contact-form {
    padding: var(--space-lg);
  }

  /* Swiper buttons smaller on mobile */
  .swiper-button-next,
  .swiper-button-prev {
    width: 18px;
    height: 18px;
  }

  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 14px;
  }
}

/* ==========================================================================
   Tablet Styles (640px - 1024px)
   ========================================================================== */

@media (min-width: 640px) and (max-width: 1023px) {
  /* Masonry Grid - 2 columns on tablet */
  .masonry-sizer,
  .masonry-item {
    width: calc(50% - var(--grid-gap) / 2);
  }

  /* Tall vase adjusts for 2-column layout on tablet */
  .masonry-card--tall img {
    height: 620px; /* 2 images (300px each) + 1 gap (20px) */
  }

  /* Process Section - 2 columns */
  .process__steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-step:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  /* About Section - no image */
.about__content {
    display: block;
    gap: var(--space-xl);
    place-items: center;
  }

  .about__image {
    order: -1;
  }

  .about__image {
    display: none;
  }

    /* About Section - no image */
.custom-products__content {
    display: block;
    gap: var(--space-xl);
    place-items: center;
  }

  .custom-products__image {
    display: none;
  }

  /* Hide custom section image on mobile */
  
}

/* ==========================================================================
   Tablet and Up (min-width: 640px)
   ========================================================================== */

@media (min-width: 640px) and (max-width: 767px) {
  /* Container padding increases */
  :root {
    --container-padding: var(--space-lg);
  }

  /* Product cards optimized for 2-slide layout */
  .product-card img {
    height: 240px;
  }
}

@media (min-width: 768px) {
  /* Hide mobile close button on desktop */
  .nav__close {
    display: none;
  }

  /* Product cards slightly larger for bigger tablets */
  .product-card img {
    height: 280px;
  }
}

/* ==========================================================================
   Tablet Landscape and Up (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {
  /* Logo size */
  .logo {
    height: 80px;
  }

  /* About section back to 2 columns */
  .about__content {
    grid-template-columns: 1fr 1fr;
  }

  .about__image {
    order: initial;
  }

  /* Custom Products section back to 2 columns */
  .custom-products__content {
    grid-template-columns: 1fr 1fr;
  }

  .custom-products__image {
    order: initial;
  }
}

/* ==========================================================================
   Desktop Styles (min-width: 1024px)
   ========================================================================== */

@media (min-width: 1024px) {
  /* Container padding increases */
  :root {
    --container-padding: var(--space-xl);
  }

  /* Masonry Grid - 3 columns on desktop */
  .masonry-sizer,
  .masonry-item {
    width: calc(33.333% - var(--grid-gap) * 2 / 3);
  }

  /* Process Section - 3 columns */
  .process__steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-step:last-child {
    grid-column: auto;
    max-width: 100%;
  }

  /* Product cards full size */
  .product-card img {
    height: 300px;
  }

  /* Swiper navigation positioned outside */
  .product-carousel .swiper-button-prev {
    left: -50px;
  }

  .product-carousel .swiper-button-next {
    right: -50px;
  }
}

/* ==========================================================================
   Large Desktop (min-width: 1280px)
   ========================================================================== */

@media (min-width: 1280px) {
  /* Increase overall font sizes slightly */
  :root {
    --font-size-base: 1.125rem;
  }

  /* Hero title even larger on big screens */
  .hero__title {
    font-size: clamp(3rem, 4vw, 4.5rem);
  }
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  /* Hide navigation, forms, and interactive elements */
  .header,
  .nav,
  .hero__cta,
  .contact-form,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none !important;
  }

  /* Ensure good contrast for printing */
  body {
    background: white;
    color: black;
  }

  /* Page breaks */
  .hero,
  .about,
  .products,
  .process,
  .contact {
    page-break-inside: avoid;
  }

  /* Remove shadows and transformations */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Landscape Orientation Adjustments
   ========================================================================== */

@media (max-height: 600px) and (orientation: landscape) {
  /* Reduce vertical padding in landscape mode */
  .hero,
  .about,
  .products,
  .process,
  .contact {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  /* Mobile navigation takes less height */
  .nav__list {
    padding: var(--space-xl) var(--space-lg);
    justify-content: flex-start;
  }
}

/* ==========================================================================
   High DPI / Retina Displays
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Use higher quality images if available */
  /* Handled by srcset in HTML */
}
