/* ==========================================================================
   Component Styles - Buttons, Cards, Forms, Carousels
   ========================================================================== */

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primaryondark {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primaryondark:hover {
  background-color: #D9D6CC;
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-md);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Product Cards
   ========================================================================== */

.product-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* Taller image height for vases */
.product-card.vase-img img {
  height: 520px;
}

/* Use contain for tall product types to show full item */
.product-card.vase-img img,
.product-card.pen-img img {
  object-fit: contain;
}

/* Use contain for bowls, ring boxes, and pill boxes to show full item */
.product-card.bowl-img img,
.product-card.ring-img img,
.product-card.pill-img img {
  object-fit: contain;
  background-color: var(--color-white);
}

.product-card__info {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card__title {
  font-size: var(--font-size-md);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  font-family: var(--font-serif);
}

/* ==========================================================================
   Swiper Carousel Customization
   ========================================================================== */

.product-carousel {
  padding-bottom: var(--space-3xl);
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  width: 44px;
  height: 44px;
  background-color: var(--color-white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-primary);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: var(--color-primary);
  transform: scale(1.1);
}

.swiper-button-next:hover::after,
.swiper-button-prev:hover::after {
  color: var(--color-white);
}

/* Swiper Pagination */
.swiper-pagination {
  bottom: 0 !important;
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background-color: var(--color-light-brown);
  opacity: 0.5;
  transition: all var(--transition-base);
}

.swiper-pagination-bullet-active {
  background-color: var(--color-primary);
  opacity: 1;
  transform: scale(1.2);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.1);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--color-light-brown);
  font-size: var(--font-size-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-base);
  border: 2px solid rgba(192, 171, 136, 0.3);
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-light-brown);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(192, 171, 136, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.6;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23645741' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  padding-right: var(--space-xl);
}

/* Form Messages */
.form-message {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  display: none;
}

.form-message.visible {
  display: block;
}

.form-message.success {
  background-color: var(--color-success);
  color: var(--color-white);
}

.form-message.error {
  background-color: var(--color-error);
  color: var(--color-white);
}

/* Loading state for submit button */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid var(--color-white);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Utility Components
   ========================================================================== */

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-white);
  animation: spin 0.6s linear infinite;
}

/* Badge */
.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  background-color: var(--color-light-brown);
  color: var(--color-primary);
}

/* ==========================================================================
   GLightbox Customization
   ========================================================================== */

/* Make product images appear clickable */
.product-card a.glightbox {
  display: block;
  cursor: zoom-in;
  transition: opacity var(--transition-base);
  position: relative;
}

.product-card a.glightbox:hover {
  opacity: 0.95;
}

/* Add subtle zoom icon overlay on hover */
.product-card a.glightbox::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23482C0C' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3Cpath d='M11 8v6M8 11h6'/%3E%3C/svg%3E");
  background-size: 20px;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card a.glightbox:hover::after {
  opacity: 1;
}

/* Customize GLightbox overlay background */
.glightbox-container {
  background-color: rgba(72, 44, 12, 0.95) !important;
}

/* Style the description text */
.gslide-desc {
  color: var(--color-light-brown) !important;
  font-family: var(--font-sans) !important;
}

/* Style the title */
.gslide-title {
  color: var(--color-white) !important;
  font-family: var(--font-serif) !important;
  font-size: var(--font-size-lg) !important;
}
