/* =========================================
   Modern Shop Layout – master-shop.css
   Only used by shop-new.php
   ========================================= */

/* --- MAIN LAYOUT WRAPPER --- */

.shop-main {
  margin-top: 190px;        /* clears your fixed header/banner */
  padding-bottom: 60px;
}

/* 80% width, responsive, centred */
.shop-category-wrap {
  width: 80%;
  margin: 0 auto;
}

.shop-category-header {
  margin-bottom: 1.75rem;
}

.shop-category-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.75rem;
  text-align: left;
}

.shop-category-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
}

/* BANNER BLOCKS (desktop + mobile) */
.shop-subcat-top,
.shop-subcat-top-mobile {
  margin-top: 1.5rem;
}

/* Desktop shows, mobile hidden by default */
.shop-subcat-top {
  display: block !important;
}

.shop-subcat-top-mobile {
  display: none !important;
}

.shop-subcat-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  margin: 0 0 1.75rem 0;
  object-fit: cover;
}

/* Grid section panel styling (grey background, rounded) */
.shop-grid-section {
  margin-top: 1.5rem;
  padding: 1.8rem;
  background-color: #f5f5f5;
  border-radius: 18px;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .shop-main {
    margin-top: 160px;
  }
  .shop-category-wrap {
    width: 90%;
  }
  .shop-category-title {
    text-align: center;
  }
}

/* Switch to mobile banner */
@media (max-width: 768px) {
  .shop-main {
    margin-top: 140px;
  }

  .shop-subcat-top {
    display: none !important;
  }

  .shop-subcat-top-mobile {
    display: block !important;
  }
}

/* =========================================
   PRODUCT GRID – 4 ACROSS ON LARGE SCREENS
   ========================================= */

.modern-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* default: 2 across */
  gap: 1.75rem;
}

/* Medium screens: 3 across */
@media (min-width: 900px) {
  .modern-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Large screens: 4 across */
@media (min-width: 1200px) {
  .modern-shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* =========================================
   PRODUCT CARD – ROUNDED, ELEVATED
   ========================================= */

.modern-shop-card {
  background-color: #ffffff;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.modern-shop-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Hover: soften styling, no vertical movement */
.modern-shop-card:hover {
  box-shadow: 0 8px 18px rgba(0,0,0,0.09);
  border-color: #d0d0d0;
}

/* =========================================
   IMAGE AREA – MAIN + OPTIONAL HOVER FADE
   ========================================= */

.modern-shop-card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;       /* consistent landscape tile */
  overflow: hidden;
}

/* Explicitly override any legacy image limits */
.modern-shop-card-image-wrapper img {
  max-width: none !important;
}

/* base image styling for both layers */
.modern-shop-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease-in-out, transform 0.35s ease-out;
}

/* hover image starts invisible, but only used when card has 'has-hover-image' */
.modern-shop-card-img.img-hover {
  opacity: 0;
}

/* Only cards with a second image actually fade between images */
.modern-shop-card.has-hover-image:hover .modern-shop-card-img.img-main {
  opacity: 0;
}

.modern-shop-card.has-hover-image:hover .modern-shop-card-img.img-hover {
  opacity: 1;
}

/* gentle zoom for ALL cards (no layout jump because images are absolutely positioned) */
.modern-shop-card:hover .modern-shop-card-img {
  transform: scale(1.03);
}

/* =========================================
   CARD BODY – TITLE, NOTE, PRICE
   ========================================= */

.modern-shop-card-body {
  padding: 0.9rem 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.35rem;
  background-color: #fff;
}

.modern-shop-card-title {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #444;
  text-align: center;
  margin: 0;
}

/* optional short note beneath title */
.modern-shop-card-note {
  font-size: 0.86rem;
  color: #999;
  text-align: center;
  margin: 0.15rem 0 0.1rem;
  min-height: 1em;
}

/* price in your green, clearly visible */
.modern-shop-card-price {
  font-size: 1.08rem;
  font-weight: 600;
  color: #1aada3;
  text-align: center;
  margin-top: 0.35rem;
}

/* Make sure links don’t get underlined */
.modern-shop-card-link:hover,
.modern-shop-card-link:focus {
  text-decoration: none;
}

/* =========================================
   SMALL-SCREEN POLISH
   ========================================= */

@media (max-width: 600px) {
  .shop-grid-section {
    padding: 1.1rem;
    border-radius: 12px;
  }

  .modern-shop-card-body {
    padding: 0.75rem 0.7rem 0.95rem;
  }

  .modern-shop-card-title {
    font-size: 0.97rem;
  }

  .modern-shop-card-price {
    font-size: 1rem;
  }
}

/* =========================================
   EMPTY STATE MESSAGE
   ========================================= */

.no-products-msg {
  font-size: 0.98rem;
  color: #777;
  text-align: center;
  padding: 1.5rem 0.5rem;
}
