/* Base Styles & Variables */
:root {
  --primary-color: #000000;
  --primary-hover: #333333;
  --secondary-color: #f8f9fa;
  --accent-color: #ff6b6b;
  --text-color: #333;
  --text-light: #666;
  --text-white: #fff;
  --border-color: #e2e8f0;
  --success-color: #48bb78;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  text-align: center;
}

h2:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--primary-color);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* Navigation */
.navbar {
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: var(--transition);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.nav-link:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover:after {
  width: 100%;
}

.cart-container {
  position: relative;
}

.cart-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-color);
  position: relative;
  padding: 0.5rem;
  cursor: pointer;
}

.cart-btn svg {
  margin-right: 5px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-left: 5px;
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 12px;
}

.cart-icon {
  stroke: currentColor;
  fill: none;
}

/* Hero Section */
.hero {
  height: 70vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  position: relative;
  margin-top: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-content {
  color: var(--text-white);
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.cta-button-small {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-button-small:hover {
  background-color: var(--primary-hover);
}

/* Products Section */
.products-section {
  padding: 4rem 0;
}

.products-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  display: block;
  width: 100%;
}

.products-section h2:after {
  left: 50%;
  transform: translateX(-50%);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-container {
  flex: 1;
  min-width: 200px;
}

.search-container input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
}

.terms-page,
.privacy-page {
  padding-top: 80px; /* Adjust this value based on your navbar height */
}

.terms-page p,
.terms-page h1,
.terms-page h2,
.privacy-page p,
.privacy-page h1,
.privacy-page h2 {
  line-height: 1.8; /* Adjust this value for better spacing */
  margin-bottom: 1.5rem; /* Add spacing between paragraphs and headings */
}

.terms-page ul,
.privacy-page ul {
  margin-bottom: 1.5rem; /* Add spacing below lists */
  padding-left: 1.5rem; /* Add indentation for list items */
}

.terms-page ul li,
.privacy-page ul li {
  margin-bottom: 0.5rem; /* Add spacing between list items */
}

.about-page {
  margin-top: 70px; /* Match other pages to account for fixed navbar */
  padding: 4rem 0;
}

.about-page h1,
.about-page h2 {
  margin-bottom: 1rem; /* Reduce spacing below headings */
  line-height: 1.4; /* Adjust line height for better spacing */
}

.about-page p {
  margin-bottom: 1rem; /* Reduce spacing below paragraphs */
  line-height: 1.6; /* Adjust line height for better readability */
}

.about-page ul {
  margin-bottom: 1rem; /* Reduce spacing below lists */
  padding-left: 1.5rem; /* Add indentation for list items */
}

.about-page ul li {
  margin-bottom: 0.5rem; /* Reduce spacing between list items */
}

.category-filter {
  width: 200px;
}

.category-filter select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  background-color: white;
  appearance: none;
  background-image: url("data:image/svg+xml; charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -5 16 16' fill='none' stroke='%23b4b4b4' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='11 2 13 4 15 2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  transition: transform 0.2s ease;
  -webkit-transition: transform 0.2s ease;
  -moz-transition: transform 0.2s ease;
  -ms-transition: transform 0.2s ease;
  -o-transition: transform 0.2s ease;
}

.gender-filter,
.genre-filter {
  width: 200px;
}

.gender-filter select,
.genre-filter select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  background-color: white;
  appearance: none;
  background-image: url("data:image/svg+xml; charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -5 16 16' fill='none' stroke='%23b4b4b4' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='11 2 13 4 15 2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  border: none;
  overflow: hidden;
  transition: var(--transition);
  background-color: white;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image-container {
  height: 300px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  position: relative;
  overflow: hidden;
}

.product-image {
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.environment-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-image {
  opacity: 0;
}

.product-card:hover .environment-img {
  opacity: 1;
}

.product-info {
  padding: 1.25rem 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.4em;
}

.product-price {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.add-to-cart {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  margin-top: auto;
  min-height: 48px; /* Add minimum height */
}

.add-to-cart:hover {
  background-color: var(--primary-hover);
}

/* Improve mobile styling for add to cart button */
@media (max-width: 480px) {
  .add-to-cart {
    padding: 1rem; /* Increase padding for better touch targets */
    font-size: 0.9rem; /* Slightly larger font */
    font-weight: 600; /* Make text more prominent */
  }

  .product-card {
    margin-bottom: 1rem; /* Add some space between cards */
  }
}

/* Product attributes */
.product-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.9);
}

.product-attributes span {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-color);
}

.product-attributes span.out-of-stock {
  color: #999;
  text-decoration: line-through;
}

/* Newsletter Section */
.newsletter {
  background-color: var(--secondary-color);
  padding: 4rem 0;
  text-align: center;
}

.newsletter h2 {
  margin-bottom: 1rem;
  display: block;
  width: 100%;
}

.newsletter h2:after {
  left: 50%;
  transform: translateX(-50%);
}

.newsletter p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-light);
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.newsletter-form button:hover {
  background-color: var(--primary-hover);
}

/* Success Message */
.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--success-color);
}

.success-message svg {
  margin-bottom: 1rem;
  width: 48px;
  height: 48px;
  stroke: var(--success-color);
}

.success-message p {
  font-weight: 500;
  margin-bottom: 0;
}

/* Footer */
footer {
  background-color: #000;
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-section h3:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-section p {
  color: #cbd5e0;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: #cbd5e0;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.social-links li a {
  display: flex;
  align-items: center;
}

.social-links li a svg {
  margin-right: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #cbd5e0;
  font-size: 0.875rem;
}

/* Cart Modal */
.cart-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.cart-modal.active {
  display: flex;
}

.cart-modal-content {
  background-color: white;
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-modal-header h3 {
  margin: 0;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

.cart-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-right: 1rem;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--primary-color);
  font-weight: 600;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f1f1;
  border: none;
  border-radius: 4px;
}

.quantity-value {
  margin: 0 0.5rem;
  width: 24px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: #e53e3e;
  margin-left: 0.5rem;
  cursor: pointer;
}

.cart-empty {
  text-align: center;
  padding: 2rem 0;
}

.cart-empty p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.cart-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.checkout-btn:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.checkout-btn:disabled {
  background-color: #cbd5e0;
  cursor: not-allowed;
}

/* Error and Empty States */
.error-message,
.no-products {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    gap: 1.5rem;
  }

  .nav-links.active {
    display: flex;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .filters {
    flex-direction: column;
  }

  .category-filter {
    width: 100%;
  }

  .gender-filter,
  .genre-filter {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 60vh;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .cart-item-quantity {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* Add this to your existing CSS */
.original-price {
  text-decoration: line-through;
  color: var(--text-light);
  margin-right: 8px;
  font-size: 0.9rem;
}

/* Product Details Page */
.product-detail-page {
  margin-top: 70px;
  padding: 4rem 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breadcrumb li {
  color: var(--text-light);
}

.breadcrumb li:not(:last-child):after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-color);
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: start;
}

/* Product Images */
.product-images {
  position: sticky;
  top: 90px;
}

.main-image {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--secondary-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.thumbnail-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.thumbnail-images img.active {
  border-color: var(--primary-color);
}

/* Product Info */
.product-info {
  padding: 0;
}

.product-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.product-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.current-price {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-color);
}

.original-price {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 1.25rem;
}

.discount-badge {
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Product Description */
.product-description {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Product Attributes */
.product-attributes {
  margin-bottom: 2rem;
  position: static;
  background: none;
  padding: 0;
}

.attribute {
  margin-bottom: 1rem;
}

.attribute .label {
  font-weight: 600;
  color: var(--text-color);
  margin-right: 0.75rem;
}

.attribute .value {
  color: var(--text-light);
}

.sizes {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.size {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

/* Product Actions */
.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  position: relative;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.quantity-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-color);
}

.quantity-input {
  width: 60px;
  height: 48px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: 1rem;
}

/* Add to Cart Button Styles */
.add-to-cart-btn {
  flex: 1;
  height: 48px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.3s ease;
  cursor: pointer;
  display: block !important; /* Force display */
  padding: 0 1.5rem;
  font-size: 0.9rem;
}

.add-to-cart-btn:hover {
  background-color: var(--primary-hover);
}

/* Loading indicator next to button */
.button-loading-indicator {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

/* Related Products */
.related-products {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border-color);
}

.related-products h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.related-products .products-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Responsive Design */
@media (max-width: 992px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-images {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .product-actions {
    flex-direction: column;
  }

  .quantity-selector {
    width: 100%;
    margin-bottom: 1rem;
  }

  .product-title {
    font-size: 1.75rem;
  }

  .add-to-cart-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    height: auto;
    min-height: 48px;
  }
}

@media (max-width: 480px) {
  .thumbnail-images {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Checkout Page Styles */
.checkout-page {
  margin-top: 70px;
  padding: 4rem 0;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
}

.checkout-form-container {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.form-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkout-submit-btn {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.checkout-submit-btn:hover {
  background-color: var(--primary-hover);
}

/* Order Summary Styles */
.order-summary {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.order-summary h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.order-items {
  margin-bottom: 2rem;
}

.order-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.order-item-details {
  display: flex;
  flex-direction: column;
}

.order-item-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.order-item-price {
  color: var(--text-light);
}

.order-totals {
  border-top: 2px solid var(--border-color);
  padding-top: 1rem;
}

.subtotal,
.shipping,
.total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.total {
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: relative;
    top: 0;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Confirmation Page Styles */
.confirmation-page {
  margin-top: 70px;
  padding: 4rem 0;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
}

.confirmation-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.confirmation-icon {
  color: var(--success-color);
  margin-bottom: 2rem;
}

.confirmation-icon svg {
  width: 64px;
  height: 64px;
}

.confirmation-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.confirmation-message {
  color: var(--text-light);
  margin-bottom: 3rem;
}

.order-details {
  text-align: left;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.order-info {
  margin-bottom: 2rem;
}

.info-group {
  display: flex;
  margin-bottom: 1rem;
}

.info-group .label {
  font-weight: 500;
  width: 150px;
}

.info-group .value {
  color: var(--text-light);
}

.confirmation-items {
  margin: 2rem 0;
}

.confirmation-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.confirmation-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.confirmation-item-details h4 {
  margin-bottom: 0.25rem;
}

.confirmation-item-price {
  font-weight: 500;
}

.confirmation-actions {
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .confirmation-content {
    padding: 2rem;
  }

  .confirmation-item {
    grid-template-columns: 60px 1fr;
  }

  .confirmation-item-price {
    grid-column: 2;
  }
}

/* Contact Page Styles */
.contact-page {
  margin-top: 70px; /* Match other pages to account for fixed navbar */
  padding: 4rem 0;
}

.contact-page h1 {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.contact-page p {
  margin-bottom: 2rem;
  max-width: 700px;
  line-height: 1.6;
}

.contact-form {
  max-width: 700px;
  margin-bottom: 2rem;
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form .cta-button {
  margin-top: 1rem;
}

.privacy-page h1,
.privacy-page h2,
.privacy-page h3,
.privacy-page h4,
.privacy-page h5,
.privacy-page h6 {
  text-align: left;
  margin-left: 0;
  padding-left: 0;
  width: 100%;
}

.privacy-page ul {
  margin-left: 0;
  padding-left: 1.5rem;
  text-align: left;
}

/* Same for terms page to ensure consistency */
.terms-page h1,
.terms-page h2,
.terms-page h3,
.terms-page h4,
.terms-page h5,
.terms-page h6 {
  text-align: left;
  margin-left: 0;
  padding-left: 0;
  width: 100%;
}

/* Fix the hover effect for product cards on the product detail page */
.related-products .product-card:hover .product-image {
  opacity: 1; /* Keep the image visible on hover */
}

.related-products .product-image-container {
  height: 200px; /* Slightly smaller for related products */
}

/* Ensure the add-to-cart-btn is always visible */
.add-to-cart-btn {
  display: block !important; /* Force display */
  flex: 1;
  height: 48px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Fix spinner container to not hide the button */
.spinner-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 10;
  pointer-events: none; /* Allow clicks to pass through */
}

