/* ===========================================
   SHOP PAGE - LUXURY BRAND STANDARD CSS
   Reference: net-a-porter.com, ssense.com, farfetch.com
   ABSOLUTE FINAL FIX - DO NOT MODIFY
   =========================================== */

.shop-hero {
  text-align: center;
  padding: 60px 0 20px;
}

.shop-filters {
  padding: 10px 0 20px;
}

#search-bar {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f5fb;
  margin-bottom: 14px;
}

.filters-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.shop-empty-note { color: #cfd8ff; text-align:center; }

/* ===========================================
   PRODUCT GRID - LUXURY LAYOUT (EXACT SPECS)
   Desktop: 3 columns, 24px gap
   Tablet: 2 columns, 20px gap  
   Mobile: 1 column, 16px gap
   =========================================== */

.product-grid,
.products-grid,
#featured-grid,
#products-grid-local,
[class*="product-grid"],
[data-shop-grid] {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  padding: 40px 20px !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  align-items: stretch !important;
}

/* ===========================================
   PRODUCT CARD - COMPREHENSIVE FIX
   Height: auto - cards size naturally based on content
   Border-radius: 12px
   Background: White
   Padding: 20px all sides
   Shadow: 0 2px 8px rgba(0,0,0,0.1)
   overflow: visible to prevent button cutoff
   =========================================== */

.product-card,
.product,
.shop-card,
[class*="product-card"],
[class*="product-item"],
#featured-grid .product-card,
#products-grid-local .product-card,
.product-grid .product-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  width: 100% !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  border: none !important;
  margin-bottom: 30px !important;
}

.product-card:hover,
.shop-card:hover,
#featured-grid .product-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

/* ===========================================
   IMAGE CONTAINER - EXACT SPECIFICATIONS
   Height: 300px FIXED
   Width: 100%
   Margin-bottom: 15px
   Display: flex (centered)
   Background: white (no weird backgrounds)
   Padding: 0px (ZERO padding)
   =========================================== */

.product-card .media,
.product-card .image,
.product-card__media,
.product-image,
.product-card-image-container,
.card__image,
.shop-img,
.product-image-wrapper,
.product-image-container,
[class*="image-container"] {
  height: 300px !important;
  width: 100% !important;
  min-height: 300px !important;
  max-height: 300px !important;
  margin-bottom: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  aspect-ratio: unset !important;
}

/* ===========================================
   PRODUCT IMAGE - EXACT SPECIFICATIONS
   Max-height: 300px (FILLS container)
   Max-width: 100%
   Width: auto
   Height: auto
   object-fit: contain
   object-position: center
   Display: block
   Margin: 0 auto
   NO IMAGE SHOULD BE CUT OFF
   IMAGES SHOULD FILL THE SPACE
   =========================================== */

.product-card img,
.product-card .media img,
.product-card .image img,
.product-card__media img,
.product-image img,
.product-card-image,
.card__image img,
.shop-img img,
.product-image-wrapper img,
#featured-grid .product-image img,
#products-grid-local .product-card img {
  max-height: 300px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  margin: 0 auto !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Direct img child of product-card */
.product-card > img {
  max-height: 300px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  margin: 0 auto 15px auto !important;
  background: #ffffff !important;
  padding: 0 !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}

/* ===========================================
   PRODUCT INFO SECTION - FLEXIBLE HEIGHT
   Min-height: 180px
   Display: flex
   Flex-direction: column
   Justify-content: space-between
   Allow buttons to always be visible
   =========================================== */

.product-card .product-card-content,
.product-card__body,
.card__body,
.shop-meta,
.product-info,
.product-details,
[class*="product-info"],
#featured-grid .product-card .product-card-content,
#products-grid-local .product-card .product-card-content {
  flex-grow: 1 !important;
  min-height: 180px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin-top: 15px !important;
}

/* Product card buttons container - ensure visibility */
.product-card-buttons,
.product-card .product-card-buttons,
#featured-grid .product-card .product-card-buttons,
#products-grid-local .product-card .product-card-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: auto !important;
  padding-top: 10px !important;
  width: 100% !important;
}

/* ===========================================
   PRODUCT TITLE - EXACT SPECIFICATIONS
   Font-size: 18px
   Font-weight: 600
   Color: Gold (#d4af37)
   Margin-bottom: 8px
   Line-height: 1.3
   Max-height: 48px (2 lines max)
   Overflow: hidden
   Text-overflow: ellipsis
   =========================================== */

.product-card h3,
.product-card .title,
.product-card__title,
.product-card-title,
.card__title,
.shop-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #d4af37 !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.3 !important;
  max-height: 48px !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  text-overflow: ellipsis !important;
}

/* ===========================================
   PRICE - EXACT SPECIFICATIONS
   Font-size: 24px
   Font-weight: bold
   Color: Gold (#d4af37)
   Margin-bottom: 12px
   =========================================== */

.product-card .price,
.product-card__price,
.product-card-price,
.card__price,
.shop-price {
  font-size: 24px !important;
  font-weight: bold !important;
  color: #d4af37 !important;
  margin: 0 0 12px 0 !important;
}

/* ===========================================
   BUTTON - COMPREHENSIVE FIX
   Width: 100%
   Height: 48px
   Background: Gold (#d4af37)
   Color: Navy (#0f0c29)
   Border-radius: 8px
   Font-size: 16px
   Font-weight: 600
   MUST ALWAYS BE VISIBLE
   =========================================== */

.product-card .view-product-btn,
.product-card .add-to-cart-btn,
.product-card button,
.product-card-buttons .view-button,
.product-card-buttons .add-to-cart-button,
.product-card-buttons .view-product-button,
.product-card-buttons .add-to-cart-button,
.product-card__actions button,
.product-card__actions a,
.card__actions button,
.card__actions a,
.add-to-cart,
.view-product,
button[class*="add"],
button[class*="cart"],
button[class*="view"],
.product button,
#featured-grid .product-card .add-to-cart-btn,
#featured-grid .product-card .view-product-button,
#featured-grid .product-card-buttons button,
#featured-grid .product-card-buttons a,
#products-grid-local .product-card button,
#products-grid-local .product-card a.view-product-button {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  background: #d4af37 !important;
  color: #0f0c29 !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 20px !important;
  cursor: pointer !important;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: flex !important;
  visibility: visible !important;
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;
}

.product-card .view-product-btn:hover,
.product-card .add-to-cart-btn:hover,
.product-card button:hover,
.product-card-buttons .view-button:hover,
.product-card-buttons .add-to-cart-button:hover,
.add-to-cart:hover,
#featured-grid .product-card button:hover,
#featured-grid .product-card a:hover {
  background: #e5c245 !important;
  transform: translateY(-2px) !important;
}

/* Product card buttons container */
.product-card .product-card-buttons,
.product-card__actions,
.card__actions,
#featured-grid .product-card .product-card-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: auto !important;
  width: 100% !important;
}

/* ===========================================
   TABLET BREAKPOINT (769px - 1024px)
   2 columns, 20px gap
   =========================================== */

@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid,
  .products-grid,
  #featured-grid,
  #products-grid-local,
  [class*="product-grid"],
  [data-shop-grid] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    padding: 30px 20px !important;
  }

  .product-card,
  .product,
  .shop-card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* ===========================================
   MOBILE BREAKPOINT (768px and below)
   1 column, 20px gap
   =========================================== */

@media (max-width: 768px) {
  .product-grid,
  .products-grid,
  #featured-grid,
  #products-grid-local,
  [class*="product-grid"],
  [data-shop-grid] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 16px !important;
  }

  .product-card,
  .product,
  .shop-card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 20px !important;
    overflow: visible !important;
  }
  
  .product-image-container,
  .product-card img,
  .product-image-wrapper {
    height: 280px !important;
    max-height: 280px !important;
    min-height: 280px !important;
  }
  
  .product-card button,
  .product-card .add-to-cart-btn,
  .add-to-cart-btn,
  button {
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 14px 16px !important;
  }

  /* Forms mobile optimization */
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
  }

  /* Filter panel stacking */
  .filters-panel {
    grid-template-columns: 1fr !important;
  }

  .shop-filters .form-group {
    width: 100%;
  }
}

/* ===========================================
   SMALL MOBILE BREAKPOINT (375px and below)
   =========================================== */

@media (max-width: 375px) {
  .product-card,
  .product,
  .shop-card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 16px !important;
    overflow: visible !important;
  }
  
  .product-image-container,
  .product-card img,
  .product-image-wrapper {
    height: 260px !important;
    max-height: 260px !important;
    min-height: 260px !important;
  }
}

/* ===========================================
   HIDE DESCRIPTIONS ON PRODUCT CARDS
   Keep cards clean and focused
   =========================================== */

.product-card .muted,
.product-card .product-card-description,
.product-card__description,
.card__desc {
  display: none !important;
}

/* ===========================================
   CRITICAL FIX: OVERRIDE style.css RULES
   These rules have maximum specificity to ensure
   product card buttons are ALWAYS visible
   =========================================== */

/* Override #featured-grid .product-card { height: 100% } from style.css */
#featured-grid .product-card,
#featured-grid .product-card.product-card,
body #featured-grid .product-card,
html body #featured-grid .product-card {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Ensure product-card-content takes remaining space */
#featured-grid .product-card .product-card-content,
body #featured-grid .product-card .product-card-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  min-height: 180px !important;
}

/* Ensure buttons are at the bottom and visible */
#featured-grid .product-card .product-card-buttons,
body #featured-grid .product-card .product-card-buttons {
  margin-top: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
}

/* Style the buttons in featured grid */
#featured-grid .product-card .product-card-buttons a,
#featured-grid .product-card .product-card-buttons button,
#featured-grid .product-card .view-product-button,
#featured-grid .product-card .add-to-cart-btn,
body #featured-grid .product-card button,
body #featured-grid .product-card a.view-product-button {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  background: #d4af37 !important;
  color: #0f0c29 !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 12px 20px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex-shrink: 0 !important;
}

/* Image container in featured grid */
#featured-grid .product-card .product-card-image-container,
#featured-grid .product-card > img,
body #featured-grid .product-card .product-card-image-container {
  height: 300px !important;
  max-height: 300px !important;
  min-height: 300px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

#featured-grid .product-card img.product-card-image,
body #featured-grid .product-card img.product-card-image {
  max-height: 300px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
