/*!
  Shopify Premium Theme Responsive Standards
  Mobile: ≤ 767px
  Tablet: 768px – 1023px
  Small Desktop: 1024px – 1279px
  Desktop: 1280px – 1439px
  Large Desktop: ≥ 1440px
  Max Content Width: 1440px (centered)
*/

/* ============================================
   BREAKPOINT VARIABLES (Shopify Standard)
   ============================================ */
:root {
  --breakpoint-mobile-max: 767px;
  --breakpoint-tablet-min: 768px;
  --breakpoint-tablet-max: 1023px;
  --breakpoint-small-desktop-min: 1024px;
  --breakpoint-small-desktop-max: 1279px;
  --breakpoint-desktop-min: 1280px;
  --breakpoint-desktop-max: 1439px;
  --breakpoint-large-desktop-min: 1440px;
  --max-content-width: 1440px;
  --container-padding-mobile: 24px;
  --container-padding-tablet: 28px;
  --container-padding-desktop: 32px;
}

/* ============================================
   CONTAINER & MAX WIDTH (Shopify Standard)
   ============================================ */
.page-width {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding-left: var(--container-padding-mobile);
  padding-right: var(--container-padding-mobile);
  width: 100%;
  box-sizing: border-box;
}

/* Tablet: 768px - 1023px */
@media only screen and (min-width: 768px) {
  .page-width {
    padding-left: var(--container-padding-tablet);
    padding-right: var(--container-padding-tablet);
  }
}

/* Desktop: 1280px+ */
@media only screen and (min-width: 1280px) {
  .page-width {
    padding-left: var(--container-padding-desktop);
    padding-right: var(--container-padding-desktop);
  }
}

/* Large Desktop: 1440px+ - content stays centered */
@media only screen and (min-width: 1440px) {
  .page-width {
    max-width: var(--max-content-width);
    margin: 0 auto;
  }
}

/* ============================================
   HEADER & NAVIGATION RESPONSIVE
   ============================================ */

/* Desktop Navigation - Show at 1280px+ */
.site-nav.site-navigation {
  display: none;
}

@media only screen and (min-width: 1280px) {
  .site-nav.site-navigation {
    display: flex;
  }
}

/* Mobile Menu Button - Show below 1280px */
.site-header__menu-toggle,
.js-drawer-open-nav {
  display: block;
}

@media only screen and (min-width: 1280px) {
  .site-header__menu-toggle,
  .js-drawer-open-nav {
    display: none;
  }
}

/* Hide mobile drawer on desktop */
@media only screen and (min-width: 1280px) {
  #NavDrawer {
    display: none !important;
  }
}

/* ============================================
   PRODUCT GRID RESPONSIVE (Shopify Standard)
   ============================================ */

/* Mobile: 1 item per row (≤ 767px) */
.grid-product {
  width: 100%;
  flex: 0 0 100%;
}

/* Tablet: 2 items per row (768px - 1023px) */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .grid-product {
    width: 50%;
    flex: 0 0 50%;
  }
  
  .grid--uniform .grid-product {
    width: calc(50% - 14px);
  }
}

/* Small Desktop: 3 items per row (1024px - 1279px) */
@media only screen and (min-width: 1024px) and (max-width: 1279px) {
  .grid-product {
    width: 33.333%;
    flex: 0 0 33.333%;
  }
  
  .grid--uniform .grid-product {
    width: calc(33.333% - 18.67px);
  }
}

/* Desktop: 4 items per row (1280px+) */
@media only screen and (min-width: 1280px) {
  .grid-product {
    width: 25%;
    flex: 0 0 25%;
  }
  
  .grid--uniform .grid-product {
    width: calc(25% - 24px);
  }
}

/* Product Grid Container */
.collection-grid__wrapper .grid {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--container-padding-mobile));
  margin-right: calc(-1 * var(--container-padding-mobile));
}

.collection-grid__wrapper .grid__item,
.collection-grid__wrapper .grid-product {
  padding-left: var(--container-padding-mobile);
  padding-right: var(--container-padding-mobile);
  box-sizing: border-box;
}

@media only screen and (min-width: 768px) {
  .collection-grid__wrapper .grid {
    margin-left: calc(-1 * var(--container-padding-tablet));
    margin-right: calc(-1 * var(--container-padding-tablet));
  }
  
  .collection-grid__wrapper .grid__item,
  .collection-grid__wrapper .grid-product {
    padding-left: var(--container-padding-tablet);
    padding-right: var(--container-padding-tablet);
  }
}

@media only screen and (min-width: 1280px) {
  .collection-grid__wrapper .grid {
    margin-left: calc(-1 * var(--container-padding-desktop));
    margin-right: calc(-1 * var(--container-padding-desktop));
  }
  
  .collection-grid__wrapper .grid__item,
  .collection-grid__wrapper .grid-product {
    padding-left: var(--container-padding-desktop);
    padding-right: var(--container-padding-desktop);
  }
}

/* ============================================
   PRODUCT IMAGE STYLING
   ============================================ */

/* Product Grid Images */
.grid-product__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.grid-product__image-mask {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Square aspect ratio */
  overflow: hidden;
  background: var(--colorSmallImageBg, #000000);
}

.grid-product__image-mask img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Product Detail Page Images */
.product__photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
}

.product__photo-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* ============================================
   RESPONSIVE UTILITY CLASSES
   ============================================ */

/* Hide on mobile, show on tablet+ */
.small--hide {
  display: none !important;
}

@media only screen and (min-width: 768px) {
  .small--hide {
    display: block !important;
  }
  
  .small--hide.flex {
    display: flex !important;
  }
}

/* Show on mobile, hide on tablet+ */
.medium-up--hide {
  display: block !important;
}

@media only screen and (min-width: 768px) {
  .medium-up--hide {
    display: none !important;
  }
}

/* Show on mobile and tablet, hide on desktop */
.desktop--hide {
  display: block !important;
}

@media only screen and (min-width: 1280px) {
  .desktop--hide {
    display: none !important;
  }
}

/* Hide on mobile and tablet, show on desktop */
.desktop--show {
  display: none !important;
}

@media only screen and (min-width: 1280px) {
  .desktop--show {
    display: block !important;
  }
  
  .desktop--show.flex,
  .site-nav.desktop--show {
    display: flex !important;
  }
  
  .desktop--show.inline-flex {
    display: inline-flex !important;
  }
}

/* ============================================
   GRID SYSTEM (12-Column Shopify Grid)
   ============================================ */

/* Mobile: Full width */
.small--one-whole {
  width: 100%;
  flex: 0 0 100%;
}

/* Tablet: 768px - 1023px */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .medium--one-half {
    width: 50%;
    flex: 0 0 50%;
  }
  
  .medium--one-third {
    width: 33.333%;
    flex: 0 0 33.333%;
  }
  
  .medium--two-thirds {
    width: 66.666%;
    flex: 0 0 66.666%;
  }
}

/* Small Desktop: 1024px - 1279px */
@media only screen and (min-width: 1024px) and (max-width: 1279px) {
  .small-desktop--one-third {
    width: 33.333%;
    flex: 0 0 33.333%;
  }
  
  .small-desktop--one-half {
    width: 50%;
    flex: 0 0 50%;
  }
}

/* Desktop: 1280px+ */
@media only screen and (min-width: 1280px) {
  .medium-up--one-quarter {
    width: 25%;
    flex: 0 0 25%;
  }
  
  .medium-up--one-third {
    width: 33.333%;
    flex: 0 0 33.333%;
  }
  
  .medium-up--one-half {
    width: 50%;
    flex: 0 0 50%;
  }
  
  .medium-up--two-fifths {
    width: 40%;
    flex: 0 0 40%;
  }
  
  .medium-up--three-fifths {
    width: 60%;
    flex: 0 0 60%;
  }
  
  .medium-up--four-fifths {
    width: 80%;
    flex: 0 0 80%;
  }
}

/* ============================================
   RESPONSIVE TYPOGRAPHY (Shopify Standard)
   ============================================ */

/* Mobile: ≤ 767px */
@media only screen and (max-width: 767px) {
  h1, .h1 {
    font-size: 1.75em;
    line-height: 1.3;
  }
  
  h2, .h2 {
    font-size: 1.5em;
    line-height: 1.4;
  }
  
  h3, .h3 {
    font-size: 1.25em;
    line-height: 1.4;
  }
}

/* Tablet: 768px - 1023px */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  h1, .h1 {
    font-size: 2.25em;
    line-height: 1.3;
  }
  
  h2, .h2 {
    font-size: 1.875em;
    line-height: 1.4;
  }
  
  h3, .h3 {
    font-size: 1.5em;
    line-height: 1.4;
  }
}

/* Small Desktop: 1024px - 1279px */
@media only screen and (min-width: 1024px) and (max-width: 1279px) {
  h1, .h1 {
    font-size: 2.5em;
    line-height: 1.2;
  }
  
  h2, .h2 {
    font-size: 2em;
    line-height: 1.3;
  }
  
  h3, .h3 {
    font-size: 1.625em;
    line-height: 1.3;
  }
}

/* Desktop: 1280px+ */
@media only screen and (min-width: 1280px) {
  h1, .h1 {
    font-size: 3em;
    line-height: 1.2;
  }
  
  h2, .h2 {
    font-size: 2.5em;
    line-height: 1.3;
  }
  
  h3, .h3 {
    font-size: 2em;
    line-height: 1.3;
  }
}

/* ============================================
   PRODUCT PAGE LAYOUT (Shopify Standard)
   ============================================ */

/* Product Single Layout - Stack on mobile, side-by-side on desktop */
.product-single .grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Tablet: 768px - 1023px */
@media only screen and (min-width: 768px) {
  .product-single .grid {
    flex-direction: row;
    gap: 3rem;
  }
}

/* Desktop: 1280px+ */
@media only screen and (min-width: 1280px) {
  .product-single .grid {
    gap: 4rem;
  }
}

/* Product Image Container */
.product-single__sticky {
  position: static;
  width: 100%;
}

@media only screen and (min-width: 768px) {
  .product-single__sticky {
    position: sticky;
    top: 2rem;
    width: 50%;
    flex: 0 0 50%;
  }
}

/* Product Meta Container */
.product-single__meta {
  width: 100%;
}

@media only screen and (min-width: 768px) {
  .product-single__meta {
    width: 50%;
    flex: 0 0 50%;
  }
}

/* ============================================
   OVERFLOW & LAYOUT FIXES
   ============================================ */

/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.page-container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.main-content {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure all containers respect max-width */
* {
  box-sizing: border-box;
}

/* Images never stretch beyond container */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* ============================================
   RESPONSIVE SPACING
   ============================================ */

/* Section spacing */
.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media only screen and (min-width: 768px) {
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media only screen and (min-width: 1280px) {
  .section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* Page content spacing */
.page-content {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media only screen and (min-width: 768px) {
  .page-content {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media only screen and (min-width: 1280px) {
  .page-content {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}
