/* Product Show Page Styles */
:root {
  --shop-primary-color: #232323;
  --shop-accent-color: #c9a992;
  --shop-background-color: #f8f8f8;
  --shop-border-color: #e6dbd2;
  --shop-text-color: #444;
  --shop-success-color: #5e9e5e;
  --shop-error-color: #d95757;
  --shop-warning-color: #eb9834;
  --shop-radius: 8px;
}

.site-events-product-section {
  padding: 1rem;
  background: #fff;
}
.site-events-product-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.site-events-product-card--single {
  display: flex;
  flex-direction: column;
  background: #f8f8f8;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
  width: 100%;
}
.site-events-product-image {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  min-height: 300px;
}
.site-events-product-main-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.site-events-product-main-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  object-fit: contain;
}
.site-events-product-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: #c9a992 #f8f8f8;
}
.site-events-product-thumbnail {
  flex: 0 0 80px;
  height: 80px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}
.site-events-product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-events-product-thumbnail.active {
  border-color: #c9a992;
}
.site-events-product-thumbnail:hover {
  border-color: #e6dbd2;
}
/* Navigation arrows for main image */
.site-events-product-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  color: #232323;
}
.site-events-product-nav:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.site-events-product-nav.prev {
  left: 1rem;
}
.site-events-product-nav.next {
  right: 1rem;
}
.site-events-product-info {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.site-events-product-categories {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-events-product-category {
  display: inline-block;
  background: #e6dbd2;
  color: #232323;
  border-radius: 8px;
  padding: 0.25rem 0.75rem;
  font-size: 0.9rem;
}
.site-events-product-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #232323;
}
.site-events-product-price {
  font-size: 1.35rem;
  font-weight: 600;
  color: #c9a992;
  margin-bottom: 1rem;
}
.site-events-product-description {
  font-size: 1rem;
  color: #444;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Product Attributes Section */
.site-events-product-attributes {
  margin-bottom: 2rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border-radius: 16px;
  border: 1px solid rgba(201, 169, 146, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.site-events-product-attributes-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #232323;
  letter-spacing: -0.025em;
}

.site-events-product-attribute-group {
  margin-bottom: 1.75rem;
}

.site-events-product-attribute-group:last-child {
  margin-bottom: 0;
}

.site-events-product-attribute-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: #232323;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.site-events-product-attribute-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-events-product-attribute-option {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
  border: 2px solid rgba(76, 175, 80, 0.3);
  border-radius: 12px;
  padding: 0.875rem 1.125rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.95rem;
  min-height: 52px;
  position: relative;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
  backdrop-filter: blur(10px);
  color: #2e7d32;
  text-align: center;
}

/* Stock indicator in top right corner */
.site-events-product-attribute-option::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4caf50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
  border: 2px solid #fff;
}

.site-events-product-attribute-option::before {
  content: '✓';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4caf50;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
  border: 2px solid #fff;
}

/* Low stock styling */
.site-events-product-attribute-option[data-stock]:not([data-stock="0"]) {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
  border-color: rgba(76, 175, 80, 0.3);
  color: #2e7d32;
}

.site-events-product-attribute-option[data-stock="1"],
.site-events-product-attribute-option[data-stock="2"],
.site-events-product-attribute-option[data-stock="3"],
.site-events-product-attribute-option[data-stock="4"],
.site-events-product-attribute-option[data-stock="5"] {
  background: linear-gradient(135deg, #fff3e0 0%, #ffebcd 100%);
  border-color: rgba(255, 152, 0, 0.4);
  color: #e65100;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.site-events-product-attribute-option[data-stock="1"]::before,
.site-events-product-attribute-option[data-stock="2"]::before,
.site-events-product-attribute-option[data-stock="3"]::before,
.site-events-product-attribute-option[data-stock="4"]::before,
.site-events-product-attribute-option[data-stock="5"]::before {
  content: '!';
  background: #ffc107;
  color: #000;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-radius: 0;
  width: 18px;
  height: 16px;
  top: -6px;
  right: -6px;
}

.site-events-product-attribute-option[data-stock="1"]::after,
.site-events-product-attribute-option[data-stock="2"]::after,
.site-events-product-attribute-option[data-stock="3"]::after,
.site-events-product-attribute-option[data-stock="4"]::after,
.site-events-product-attribute-option[data-stock="5"]::after {
  display: none;
}

.site-events-product-attribute-option:hover:not(:disabled):not(.out-of-stock) {
  border-color: rgba(76, 175, 80, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.25);
}

.site-events-product-attribute-option[data-stock="1"]:hover,
.site-events-product-attribute-option[data-stock="2"]:hover,
.site-events-product-attribute-option[data-stock="3"]:hover,
.site-events-product-attribute-option[data-stock="4"]:hover,
.site-events-product-attribute-option[data-stock="5"]:hover {
  border-color: rgba(255, 152, 0, 0.6);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.25);
}

.site-events-product-attribute-option.selected {
  border-color: #1976d2;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
  transform: translateY(-1px);
}

.site-events-product-attribute-option.selected:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(25, 118, 210, 0.5);
}

.site-events-product-attribute-option.selected::before {
  background: #fff;
  color: #1976d2;
  content: '✓';
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.4);
  clip-path: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  top: -4px;
  right: -4px;
}

.site-events-product-attribute-option.selected::after {
  display: none;
}

/* Ensure selected state overrides stock states */
.site-events-product-attribute-option.selected[data-stock] {
  border-color: #1976d2 !important;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4) !important;
}

.site-events-product-attribute-option.out-of-stock,
.site-events-product-attribute-option[data-stock="0"] {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-color: rgba(158, 158, 158, 0.4);
  color: #616161;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: 0 2px 8px rgba(158, 158, 158, 0.15);
}

.site-events-product-attribute-option.out-of-stock::before,
.site-events-product-attribute-option[data-stock="0"]::before {
  content: '!';
  background: #ffc107;
  color: #d32f2f;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-radius: 0;
  width: 18px;
  height: 16px;
  top: -6px;
  right: -6px;
}

.site-events-product-attribute-option.out-of-stock::after,
.site-events-product-attribute-option[data-stock="0"]::after {
  display: none;
}

.site-events-product-attribute-option.out-of-stock:hover,
.site-events-product-attribute-option[data-stock="0"]:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(158, 158, 158, 0.15);
  border-color: rgba(158, 158, 158, 0.4);
}

.site-events-color-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
  position: relative;
}

.site-events-product-attribute-option.selected .site-events-color-preview {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 4px 12px rgba(0,0,0,0.2);
}

.site-events-attribute-value {
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.2;
}

.site-events-price-adjustment {
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
  background: rgba(76, 175, 80, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  margin-top: 0.125rem;
  white-space: nowrap;
}

.site-events-product-attribute-option.selected .site-events-price-adjustment {
  color: rgba(255,255,255,0.9);
  background: rgba(255, 255, 255, 0.2);
}

.site-events-product-attribute-option[data-stock="1"] .site-events-price-adjustment,
.site-events-product-attribute-option[data-stock="2"] .site-events-price-adjustment,
.site-events-product-attribute-option[data-stock="3"] .site-events-price-adjustment,
.site-events-product-attribute-option[data-stock="4"] .site-events-price-adjustment,
.site-events-product-attribute-option[data-stock="5"] .site-events-price-adjustment {
  background: rgba(255, 152, 0, 0.15);
  color: #e65100;
}

.site-events-product-attribute-option.out-of-stock .site-events-price-adjustment,
.site-events-product-attribute-option[data-stock="0"] .site-events-price-adjustment {
  background: rgba(158, 158, 158, 0.15);
  color: #616161;
}

/* Remove old low stock indicator - now handled by corner triangles */
.site-events-low-stock-indicator {
  display: none;
}

/* Enhanced Add to Cart Button */
.site-events-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  background: linear-gradient(135deg, #232323 0%, #1a1a1a 100%);
  border: none;
  border-radius: 14px;
  padding: 1rem 1.5rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(35, 35, 35, 0.3);
  position: relative;
  overflow: hidden;
}

.site-events-add-to-cart::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.site-events-add-to-cart:hover::before {
  left: 100%;
}

.site-events-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(35, 35, 35, 0.4);
  background: linear-gradient(135deg, #c9a992 0%, #b89981 100%);
}

.cart-text {
  flex: 1;
  text-align: left;
  letter-spacing: 0.025em;
  position: relative;
  z-index: 1;
}

.cart-price {
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.025em;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Add to cart button states */
.site-events-add-to-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, #888 0%, #666 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-events-add-to-cart:disabled:hover {
  background: linear-gradient(135deg, #888 0%, #666 100%);
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-events-add-to-cart:disabled::before {
  display: none;
}

.site-events-add-to-cart:disabled .cart-price {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.05);
}

/* Attribute validation states */
.site-events-product-attribute-group.invalid {
  border-left: 4px solid var(--shop-error-color);
  padding-left: 1rem;
  background: rgba(217, 87, 87, 0.02);
  border-radius: 0 12px 12px 0;
}

.site-events-product-attribute-group.invalid .site-events-product-attribute-label::after {
  content: ' *';
  color: var(--shop-error-color);
  font-weight: 700;
}

/* Special styling for color attributes */
.site-events-product-attribute-group[data-attribute-type="color"] .site-events-product-attribute-option,
.site-events-product-attribute-group[data-attribute-type="colour"] .site-events-product-attribute-option {
  min-width: 70px;
  padding: 0.75rem;
  gap: 0.375rem;
}

.site-events-product-attribute-group[data-attribute-type="color"] .site-events-attribute-value,
.site-events-product-attribute-group[data-attribute-type="colour"] .site-events-attribute-value {
  font-size: 0.8rem;
  margin-top: 0.125rem;
}

.site-events-product-attribute-group[data-attribute-type="color"] .site-events-color-preview,
.site-events-product-attribute-group[data-attribute-type="colour"] .site-events-color-preview {
  margin-bottom: 0.125rem;
}

/* Animation for attribute selection */
@keyframes attributeSelect {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.site-events-product-attribute-option.selected {
  animation: attributeSelect 0.2s ease-out;
}

/* Loading state for add to cart */
.site-events-add-to-cart.loading {
  pointer-events: none;
}

.site-events-add-to-cart.loading .cart-text::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Enhanced focus states for accessibility */
.site-events-product-attribute-option:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.site-events-product-attribute-option[data-stock="1"]:focus,
.site-events-product-attribute-option[data-stock="2"]:focus,
.site-events-product-attribute-option[data-stock="3"]:focus,
.site-events-product-attribute-option[data-stock="4"]:focus,
.site-events-product-attribute-option[data-stock="5"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3);
}

.site-events-product-attribute-option.out-of-stock:focus,
.site-events-product-attribute-option[data-stock="0"]:focus {
  box-shadow: 0 0 0 3px rgba(158, 158, 158, 0.3);
}

.site-events-product-attribute-option.selected:focus {
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.3);
}

.site-events-add-to-cart:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 35, 35, 0.3);
}
.site-events-product-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.site-events-add-to-cart, .site-events-wishlist-btn {
  width: 100%;
  background: #232323;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.site-events-add-to-cart:hover {
  background: #c9a992;
  color: #232323;
}
.site-events-wishlist-btn {
  background: #fff;
  color: #c9a992;
  border: 2px solid #c9a992;
}
.site-events-wishlist-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.site-events-wishlist-btn:hover {
  background: #c9a992;
  color: #fff;
}
.site-events-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  position: relative;
  width: fit-content;
  min-width: 80px;
  text-align: center;
  overflow: visible;
}

.site-events-product-badge::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 22px;
  z-index: -1;
  animation: outerPulse 2s infinite;
}

@keyframes outerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.site-events-badge-limited { 
  background: #d95757;
}
.site-events-badge-sale { 
  background: #eb9834;
}
.site-events-badge-new { 
  background: #5e9e5e;
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
  .site-events-product-section {
    padding: 2rem;
  }

  .site-events-product-card--single {
    flex-direction: row;
  }

  .site-events-product-image {
    flex: 1 1 350px;
    min-width: 350px;
    padding: 2rem;
  }

  .site-events-product-info {
    flex: 2 1 0;
    padding: 2rem 2.5rem;
  }

  .site-events-product-title {
    font-size: 2.2rem;
  }

  .site-events-product-price {
    font-size: 1.5rem;
  }

  .site-events-product-cta {
    flex-direction: row;
  }

  .site-events-add-to-cart, 
  .site-events-wishlist-btn {
    width: auto;
  }

  .site-events-product-attributes {
    padding: 2rem;
    border-radius: 20px;
  }

  .site-events-product-attribute-options {
    gap: 1rem;
  }

  .site-events-product-attribute-option {
    padding: 1rem 1.25rem;
    min-height: 56px;
    border-radius: 14px;
  }

  .site-events-add-to-cart {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border-radius: 16px;
  }

  .cart-price {
    padding: 0.625rem 1rem;
    font-size: 1.15rem;
    border-radius: 10px;
  }
}

/* Mobile-specific attribute styles */
@media (max-width: 576px) {
  .site-events-product-attributes {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }

  .site-events-product-attributes-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
  }

  .site-events-product-attribute-group {
    margin-bottom: 1.5rem;
  }

  .site-events-product-attribute-option {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 140px;
    padding: 0.75rem 0.875rem;
    min-height: 56px;
    border-radius: 10px;
  }

  .site-events-product-attribute-options {
    gap: 0.75rem;
  }

  .site-events-color-preview {
    width: 20px;
    height: 20px;
    border-width: 2px;
  }

  /* Mobile corner indicators */
  .site-events-product-attribute-option::before {
    width: 16px;
    height: 14px;
    font-size: 12px;
    top: -4px;
    right: -4px;
  }

  .site-events-product-attribute-option::after {
    width: 16px;
    height: 16px;
    top: -4px;
    right: -4px;
  }

  .site-events-price-adjustment {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    margin-top: 0.125rem;
    border-radius: 4px;
    font-weight: 700;
  }

  .site-events-add-to-cart {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .cart-price {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
  }
}
