:root {
  --primary-color: #f8f5f2;
  --accent-color: #635147;
  --text-color: #373737;
  --light-accent: #e7e2dd;
  --success-color: #4caf50;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--primary-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  min-height: 100vh;
  line-height: 1.5;
  overflow: hidden;
}

.container {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 1800px;
  width: 100%;
  height: 98vh;
  display: flex;
  flex-wrap: wrap;
}

/* Header navigation */
.header {
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--light-accent);
  height: 8%;
  background-color: #fff;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
  letter-spacing: 1px;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--accent-color);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery {
  flex: 1 1 650px;
  position: relative;
  overflow: hidden;
  height: 92%;
  background-color: #f9f7f5;
}

.slide-container {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.slide img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.slide img:hover {
  transform: scale(1.05);
}

.slide-arrows,
.slide-dots {
  position: absolute;
  width: 100%;
  left: 0;
  display: flex;
  justify-content: space-between;
}

.slide-arrows {
  top: 50%;
  transform: translateY(-50%);
  padding: 0 1rem;
}

.arrow {
  background: rgba(255, 255, 255, 0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.arrow:hover {
  background: var(--accent-color);
  color: white;
}

.slide-dots {
  bottom: 1rem;
  justify-content: center;
  gap: 0.7rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background: rgba(99, 81, 71, 0.5);
}

.dot.active {
  background: var(--accent-color);
  transform: scale(1.2);
}

/* Thumbnails */
.thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding: 0 2rem 1rem;
  justify-content: center;
  width: 100%;
}

.thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  object-fit: cover;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.thumb:hover {
  opacity: 1;
}

.thumb.active {
  border-color: var(--accent-color);
  opacity: 1;
}

/* Details */
.details {
  flex: 1 1 550px;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 92%;
  overflow-y: auto;
}

.product-header {
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2.4rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.tagline {
  color: var(--accent-color);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.price {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.shipping {
  font-size: 0.9rem;
  color: #777;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.description {
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1rem;
}

.features {
  margin-bottom: 1.5rem;
}

.features h3 {
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  color: var(--accent-color);
}

.feature-list {
  list-style: none;
  font-size: 0.95rem;
}

.feature-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.feature-list li i {
  color: var(--accent-color);
  font-size: 0.9rem;
}

/* Buttons */
.btn,
.btn-outline {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn {
  background: var(--accent-color);
  color: white;
  border: none;
  margin-bottom: 1rem;
}

.btn-outline {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn:hover {
  background: #50413a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 81, 71, 0.3);
}

.btn-outline:hover {
  background: #f0e9e2;
  transform: translateY(-2px);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

#paypal-button-container {
  width: 100%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
  padding: 20px 0;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: all 0.3s ease;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: fixed;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1010;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
  color: var(--accent-color);
  background: white;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  text-align: center;
}

.checkout-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  right: -20px;
  width: 40px;
  height: 2px;
  background-color: #ddd;
}

.step.active:not(:last-child)::after {
  background-color: var(--accent-color);
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: #999;
  font-weight: bold;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background-color: var(--accent-color);
  color: white;
}

.step-label {
  font-size: 0.8rem;
  color: #999;
  transition: all 0.3s ease;
}

.step.active .step-label {
  color: var(--accent-color);
  font-weight: 600;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
  -webkit-appearance: none; /* Improves iOS form field appearance */
}

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

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(99, 81, 71, 0.1);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.btn-modal {
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-secondary {
  background-color: #eee;
  color: #555;
}

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

.btn-secondary:hover {
  background-color: #ddd;
}

.btn-primary:hover {
  background-color: #50413a;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 900;
  transition: right 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.cart-header h2 {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
}

.btn-close:hover {
  color: var(--accent-color);
}

.cart-items {
  margin-bottom: 2rem;
  list-style: none;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 1rem;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.cart-item-price {
  color: var(--accent-color);
  font-weight: 500;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase;
}

.btn-checkout:hover {
  background: #50413a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 81, 71, 0.3);
}

.empty-cart {
  text-align: center;
  color: #999;
  padding: 2rem 0;
}

.empty-cart i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ddd;
}

/* Order Summary */
.order-summary {
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.order-summary h3 {
  margin-bottom: 1rem;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #ddd;
  font-weight: 700;
  font-size: 1.1rem;
}

.summary-label {
  color: #555;
}

.summary-value {
  font-weight: 600;
  color: var(--accent-color);
}

/* Success Animation */
.success-animation {
  text-align: center;
  padding: 2rem 0;
}

.success-animation h2 {
  color: var(--success-color);
  margin-bottom: 0.5rem;
}

.success-animation p {
  color: #666;
  margin-bottom: 0.5rem;
}

.success-animation p:last-child {
  font-size: 0.9rem;
  color: #999;
  margin-top: 1.5rem;
}

.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--success-color);
  stroke-miterlimit: 10;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--success-color);
  fill: none;
  animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

/* Button styles for cart item removal */
.btn-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 5px;
  transition: color 0.2s;
}

.btn-remove:hover {
  color: #ff5a5a;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill {
  100% {
    box-shadow: 0 0 0 30px rgba(76, 175, 80, 0);
  }
}

/* Responsive */
@media (min-width: 1600px) {
  body {
    font-size: 16px;
  }

  .container {
    max-width: 95%;
    height: 96vh;
  }
}

@media (max-width: 1200px) {
  .container {
    height: auto;
  }

  .gallery,
  .details {
    height: auto;
  }

  body {
    overflow: auto;
  }
}


.modal-content {
  position: relative;
  padding-top: 10px;
}

@media (max-width: 768px) {
  .modal {
    width: 95%;
    padding: 1.5rem;
    max-height: 80vh;
  }
  
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 768px) {
  .container {
    box-shadow: none;
    border-radius: 0;
  }

  .gallery {
    min-height: 300px;
  }

  .header {
    padding: 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .details {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .thumbnails {
    padding: 0 1rem 1rem;
  }

  .thumb {
    width: 50px;
    height: 50px;
  }
  
  .modal {
    width: 95%;
    padding: 1.5rem;
  }
  
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  
}
