/*
 * Astur Climbing Shop Styles
 * Following 2026 Brand Guidelines
 */

/* Shop Hero Section */
/* Shop Hero Section */
.shop-hero {
  background-color: var(--astur-dark);
  color: var(--summit-white);
  overflow: hidden;
  margin-top: 70px; /* navbar offset */
}

.shop-hero-inner {
  display: flex;
  height: 320px;
}

.shop-hero-text {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 36px 60px;
}

.shop-hero-title {
  font-size: 28px;
  line-height: 1.1;
  color: var(--summit-white);
  margin: 0;
}

.shop-hero-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
  max-width: 320px;
}

.shop-hero-images {
  flex: 0 0 55%;
  display: flex;
  gap: 3px;
}

.shop-hero-img-main {
  flex: 1;
}

.shop-hero-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-hero-img-secondary {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shop-hero-img-secondary img {
  width: 100%;
  flex: 1;
  object-fit: cover;
  display: block;
  min-height: 0;
}

@media (max-width: 991px) {
  .shop-hero-subtitle {
    display: none;
  }
}

@media (max-width: 767px) {
  .shop-hero-inner {
    flex-direction: column;
    height: auto;
  }
  .shop-hero-text {
    flex: none;
    padding: 28px 24px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .shop-hero-text .btn {
    flex-shrink: 0;
  }
  .shop-hero-title {
    font-size: 22px;
  }
  .shop-hero-images {
    flex: none;
    height: 200px;
  }
}

/* Filter Buttons */
.shop-filters {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  padding: 12px 24px;
  border: 2px solid var(--sage-green);
  background-color: transparent;
  color: var(--astur-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.filter-btn:hover {
  background-color: var(--sage-green);
  color: var(--summit-white);
}

.filter-btn.active {
  background-color: var(--sage-green);
  color: var(--summit-white);
}

/* Product Grid */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
  transition: all 0.3s ease;
}

.product-grid.filtering {
  pointer-events: none;
}

.product-item {
  margin-bottom: 30px;
  display: flex;
  padding-left: 15px;
  padding-right: 15px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Product Card */
.product-card {
  background: var(--summit-white);
  border: 1px solid var(--sage-green-20);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(37, 35, 35, 0.15);
  border-color: var(--sage-green);
}

/* Product Image */
.product-image-link {
  display: block;
  text-decoration: none;
}

.product-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background-color: var(--sage-green-10);
  overflow: hidden;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Product Badges */
.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  z-index: 2;
}

.badge-new {
  background-color: var(--sage-green);
  color: var(--summit-white);
}

.badge-popular {
  background-color: var(--crimson-cliff);
  color: var(--summit-white);
}

.badge-save {
  background-color: var(--rose-quartz);
  color: var(--astur-dark);
}

/* Product Info */
.product-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.125rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.product-title a {
  color: var(--astur-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-title a:hover {
  color: var(--sage-green);
}

.product-description {
  color: var(--astur-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
  min-height: 48px; /* 2 lines minimum to keep consistent */
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sage-green);
  margin-bottom: 16px;
}

.price-original {
  font-size: 1.125rem;
  text-decoration: line-through;
  color: var(--astur-dark);
  opacity: 0.6;
  margin-right: 10px;
}

.price-sale {
  color: var(--crimson-cliff);
}

/* Product Detail Page Styles */
.product-detail-hero {
  padding-top: 120px;
  padding-bottom: 60px;
}

.product-detail-image {
  width: 100%;
  border-radius: 8px;
  border: 2px solid var(--sage-green-20);
  background-color: var(--sage-green-10);
}

.product-detail-info {
  padding-left: 40px;
}

.product-detail-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--astur-dark);
}

.product-detail-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sage-green);
  margin-bottom: 30px;
}

.product-features-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.product-features-list li {
  padding: 12px 0;
  padding-left: 35px;
  position: relative;
  font-family: var(--font-body);
  color: var(--astur-dark);
  border-bottom: 1px solid var(--sage-green-10);
}

.product-features-list li:last-child {
  border-bottom: none;
}

.product-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage-green);
  font-weight: bold;
  font-size: 1.2em;
}

.product-specs {
  background: var(--sage-green-10);
  padding: 30px;
  border-radius: 8px;
  margin-top: 40px;
}

.product-specs h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  color: var(--astur-dark);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--sage-green-20);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--astur-dark);
  opacity: 0.7;
}

.spec-value {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--astur-dark);
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.quantity-selector label {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--astur-dark);
}

.quantity-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--sage-green);
  border-radius: 4px;
  overflow: hidden;
}

.quantity-btn {
  background: var(--sage-green);
  color: var(--summit-white);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.3s ease;
}

.quantity-btn:hover {
  background: var(--astur-dark);
}

.quantity-value {
  padding: 10px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  min-width: 60px;
  text-align: center;
  background: var(--summit-white);
}

/* Add to Cart Button */
.btn-add-to-cart {
  font-size: 1.125rem;
  padding: 15px 40px;
  margin-top: 20px;
}

/* Related Products — compact card overrides */
#related-products .product-info {
  padding: 14px 16px 16px;
}

#related-products .product-title {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

#related-products .product-description {
  font-size: 0.8rem;
  margin-bottom: 10px;
}

#related-products .product-price {
  font-size: 1rem;
  margin-bottom: 10px;
}

#related-products .btn {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.related-products {
  padding: 80px 0;
  background: var(--sage-green-10);
}

.related-products h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 50px;
  color: var(--astur-dark);
}

/* Responsive */
@media (max-width: 991px) {
  .product-detail-info {
    padding-left: 0;
    margin-top: 40px;
  }
}

@media (max-width: 767px) {
  .shop-filters {
    justify-content: flex-start;
  }

  .filter-btn {
    font-size: 0.75rem;
    padding: 10px 16px;
  }

  .product-detail-title {
    font-size: 1.5rem;
  }

  .product-detail-price {
    font-size: 1.5rem;
  }

  /* Gallery: hide side thumbnails, stretch main image to full width */
  .product-gallery-row > [class*="col-"]:first-child,
  .product-gallery-row > [class*="col-"]:last-child {
    display: none;
  }

  .product-gallery-row > [class*="col-"]:nth-child(2) {
    width: 100%;
  }
}

/* Mobile - Fix card sizes */
@media (max-width: 575px) {
  /* Center single column on very small screens */
  .product-grid {
    justify-content: center;
  }

  /* Ensure consistent card width */
  .product-item {
    max-width: 400px;
    width: 100%;
    flex: 0 0 100%;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  /* Ensure 2 equal columns on small screens */
  .product-item {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Footer Styling */
.footer {
  background-color: var(--astur-dark);
  color: var(--summit-white);
  padding: 10px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.footer .row {
  width: 100%;
  margin: 0;
}

.footer .copyright {
  font-size: 0.8125rem;
  margin: 0;
  text-align: left;
  line-height: 1.4;
  display: inline-block;
  vertical-align: middle;
}

.footer-social-links {
  text-align: left !important;
  margin-top: 0;
  margin-left: 15px;
  display: inline-block;
  vertical-align: middle;
}

.footer-social-links a {
  color: var(--sage-green);
  font-size: 1.0625rem;
  margin-right: 12px;
  margin-left: 0;
  transition: color 0.3s ease;
  vertical-align: middle;
}

.footer-social-links a:hover {
  color: var(--summit-white);
}

/* Product Image Gallery */
.product-gallery-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.product-gallery-row > [class*="col-"] {
  float: none;
}

.product-gallery-main {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--sage-green-10);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(37, 35, 35, 0.55);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
}

.gallery-nav img {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

.gallery-prev {
  left: 12px;
}

.gallery-prev img {
  transform: translateX(-5px);
}

.gallery-next {
  right: 12px;
}

.gallery-next img {
  transform: translateX(5px);
}

.product-gallery-main:hover .gallery-prev {
  opacity: 0.75;
}

.product-gallery-main:hover .gallery-next {
  opacity: 0.75;
}

.gallery-nav:hover {
  opacity: 1 !important;
}

.gallery-thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--sage-green-10);
  cursor: pointer;
  width: 100%;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.gallery-thumb:hover img {
  opacity: 0.85;
}
