/* ============================
   Store Theme CSS - LG Cool Store (Dark Theme)
   ============================ */

/* Product-specific styles */
.figure.product {
  border-radius: 0.75em;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: var(--color-neutral-light);
  border: 1px solid var(--color-neutral-medium);
}

.figure.product:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Product Overlay Effect */
.product-overlay {
  position: relative;
  overflow: hidden;
  border-radius: 0.75em;
  background-color: var(--color-neutral-light);
}

.product-overlay figcaption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2em;
}

.product-overlay:hover figcaption {
  opacity: 1;
}

.product-overlay .caption-body {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.95), rgba(244, 162, 97, 0.95));
  backdrop-filter: blur(10px);
  border-radius: 0.75em;
  padding: 1.5em;
  transform: translateY(2em);
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.product-overlay:hover .caption-body {
  transform: translateY(0);
}

.product-overlay img {
  transform: scale(1);
  transition: all 0.4s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-overlay:hover img {
  transform: scale(1.1);
}

.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25em;
  margin-bottom: 0.3em;
  color: var(--color-neutral-dark);
  letter-spacing: -0.02em;
}

.product-price {
  color: var(--color-neutral-dark);
  font-weight: 800;
  font-size: 1.5em;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Favorite/Heart Icon */
.favorite {
  display: inline-block;
}

.favorite label {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: inline-block;
  transform: scale(1);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.75em;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.favorite label:hover {
  transform: scale(1.1);
  color: rgba(255, 255, 255, 0.8);
}

.favorite input:checked + label {
  color: #ff4444;
  transform: scale(1.3);
  filter: drop-shadow(0 4px 8px rgba(255, 68, 68, 0.4));
}

/* Product Grid Layout */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.product-grid img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  border-radius: 0.75em;
}

/* Promo Banner */
.promo-banner {
  background: linear-gradient(135deg, var(--color-main-light) 0%, var(--color-main-medium) 100%);
  color: var(--color-neutral-dark);
  font-weight: 600;
  text-align: center;
  padding: 1.25em;
  margin-top: 2em;
  font-size: 1.05em;
  letter-spacing: -0.01em;
}

.promo-banner span {
  font-family: var(--font-display);
}

/* Article Body */
.article-body {
  line-height: 1.8;
  font-size: 1.05em;
  color: var(--color-text);
}

.article-body p {
  margin-bottom: 1.25em;
}

.article-body p:first-of-type {
  font-size: 1.15em;
  font-weight: 400;
  color: var(--color-text);
}

/* Responsive Product Grid */
@media (max-width: 800px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Mobile Product Overlay - Always show caption */
  .product-overlay figcaption {
    position: relative;
    display: block;
    top: initial;
    left: initial;
    width: 100%;
    height: initial;
    opacity: 1;
    background: none;
    padding: 0;
  }

  .product-overlay .caption-body {
    transform: none;
    padding: 1.25em;
    margin-top: 1em;
    background: linear-gradient(135deg, var(--color-main-light), var(--color-main-medium));
  }

  .product-overlay:hover img {
    transform: scale(1);
  }
}

/* Additional Store Utilities */
.sale-badge {
  background: linear-gradient(135deg, var(--color-main-medium), var(--color-main-dark));
  color: var(--color-neutral-dark);
  padding: 0.4em 1em;
  border-radius: 2em;
  font-size: 0.85em;
  font-weight: 700;
  font-family: var(--font-display);
  display: inline-block;
  margin-bottom: 0.5em;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.stock-indicator {
  font-size: 0.9em;
  color: var(--color-text-muted);
  font-weight: 500;
  font-family: var(--font-sans);
}

.stock-indicator.low {
  color: var(--color-main-medium);
  font-weight: 600;
}

.stock-indicator.out {
  color: var(--color-text-muted);
  text-decoration: line-through;
  opacity: 0.6;
}

/* Cart Button Styles */
.add-to-cart {
  background: linear-gradient(135deg, var(--color-main-light), var(--color-main-medium));
  color: var(--color-neutral-dark);
  padding: 0.75em 1.5em;
  border-radius: 0.5em;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
  font-size: 1em;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.add-to-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(244, 162, 97, 0.4);
}

.add-to-cart:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(244, 162, 97, 0.3);
}

/* Enhanced Typography for Store */
.product-overlay .caption-body,
.product-name,
.product-price {
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Better readability for small text */
@media (max-width: 400px) {
  .product-name {
    font-size: 1.1em;
  }
  
  .product-price {
    font-size: 1.3em;
  }
  
  .sale-badge {
    font-size: 0.75em;
  }
}