/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  min-height: 100vh;
}

/* Header Styles */
.main-header {
  background-color: #8b0000;
  color: white;
  padding: 1rem 0 0 0;
  font-family: "Montserrat", sans-serif;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
}

.logo img {
  height: 50px;
}

.search-bar {
  flex: 1;
  max-width: 700px;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 25px;
  padding: 0.15rem 0.75rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.2rem;
  font-size: 0.7rem;
  background: transparent;
  color: #333;
  text-align: center;
  align-items: center;
}

.search-button {
  background: none;
  border: none;
  color: #8b0000;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1rem;
}

.header-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header-actions a {
  color: white;
  font-size: 1.2rem;
  opacity: 0.9;
  transition: opacity 0.2s;
  text-decoration: none;
}

.header-actions a:hover {
  opacity: 1;
}

.cart-icon {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #8b0000;
  color: white;
  font-size: 12px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.main-nav {
  background-color: #8b0000;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
}

/* Breadcrumb */
.breadcrumb-container {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  color: #8b0000;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.separator {
  margin: 0 0.5rem;
  color: #999;
}

.current-page {
  color: #333;
}

/* Product Details Container */
.product-details-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem; 
}

.product-details-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Product Images */
.product-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image {
  position: relative;
  padding-top: 100%;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.main-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-desc-image {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Button to view description image on mobile */
.view-desc-image-btn {
  display: none;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #8b0000 0%, #b10b0b 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.view-desc-image-btn:hover {
  background: linear-gradient(135deg, #6b0000 0%, #8b0000 100%);
  box-shadow: 0 6px 16px rgba(139, 0, 0, 0.4);
  transform: translateY(-2px);
}

.view-desc-image-btn:active {
  transform: translateY(0);
}

.view-desc-image-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.view-desc-image-btn:hover svg {
  transform: scale(1.1);
}

/* Modal for description image */
.desc-image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.desc-image-modal.active {
  display: flex;
}

.desc-image-modal-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  background: white;
  border-radius: 8px;
  overflow: auto;
}

.desc-image-modal img {
  width: 100%;
  height: auto;
  display: block;
}

.desc-image-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.desc-image-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Product Information */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-brand {
  font-size: 1rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

.product-title {
  font-size: 1.8rem;
  color: #333;
  line-height: 1.3;
  margin: 0;
}

.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: #8b0000;
}

/* Product Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stars {
  display: flex;
  gap: 0.2rem;
}

.star {
  font-size: 1.2rem;
  color: #ddd;
}

.star.filled {
  color: #ffc107;
}

.rating-text {
  color: #666;
  font-size: 0.9rem;
}

/* Size Selection */
.size-selection {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fafafa;
}

.size-selection h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333;
}

.size-guide-link {
  margin-bottom: 1rem;
}

.size-guide-link a {
  color: #8b0000;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px dashed #8b0000;
}

.size-guide-link a:hover {
  text-decoration: none;
  border-bottom: 1px solid #8b0000;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.size-option {
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  font-weight: 500;
}

.size-option:hover {
  border-color: #8b0000;
  background: #f8f9fa;
}

.size-option.selected {
  border-color: #8b0000;
  background: #8b0000;
  color: white;
}

.size-option.unavailable {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  position: relative;
}

.size-option.unavailable::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1px;
  background: #999;
  transform: rotate(-45deg);
}

.size-error {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Quantity Selection */
.quantity-selection h3 {
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
  color: #333;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid #ddd;
  border-radius: 6px;
  width: fit-content;
}

.quantity-btn {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: #666;
  transition: color 0.2s;
}

.quantity-btn:hover {
  color: #333;
}

.quantity-input {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 2px solid #ddd;
  border-right: 2px solid #ddd;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
}

.quantity-note {
  font-size: 0.9rem;
  color: #c23d3d;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

/* Action Buttons */
.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Product description */
.product-description p {
  white-space: pre-wrap;
}

.add-to-cart-btn {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #8b0000;
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 0.5rem;
}

.add-to-cart-btn:hover {
  background-color: #6a0000;
}

.add-to-cart-btn:disabled {
  background-color: #6a0000;
  cursor: not-allowed;
}

.wishlist-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: white;
  color: #8b0000;
  border: 2px solid #8b0000;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.5rem;
}

.wishlist-btn:hover {
  background: white;
  color: #5e0000;
}

.wishlist-btn:disabled {
  background: white;
  color: #5e0000;
  cursor: not-allowed;
}

.wishlist-btn:disabled:hover {
  color: #999;
  background: white;
  border-color: #ccc;
}

/* Product Features */
.product-features h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333;
}

.product-features ul {
  list-style: none;
  padding: 0;
}

.product-features li {
  padding: 0.5rem 0;
  color: #666;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 1.5rem;
}

.product-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

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

/* Shipping Info */
.shipping-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #eee;
}

.shipping-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #666;
}

.shipping-item:last-child {
  margin-bottom: 0;
}

.shipping-item svg {
  color: #8b0000;
  flex-shrink: 0;
}

/* Size Guide Modal */
.size-guide-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
}

.size-guide-content {
  position: relative;
  background-color: white;
  margin: 2rem auto;
  max-width: 800px;
  width: 90%;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.close-size-guide {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  z-index: 1;
}

.close-size-guide:hover {
  color: #333;
}

.size-guide-content h2 {
  margin-bottom: 2rem;
  color: #333;
  text-align: center;
}

.size-guide-tables {
  display: grid;
  gap: 2rem;
}

.size-table h3 {
  margin-bottom: 1rem;
  color: #8b0000;
}

.size-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ddd;
}

.size-table th,
.size-table td {
  padding: 0.75rem;
  text-align: center;
  border: 1px solid #ddd;
}

.size-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.size-table tr:nth-child(even) {
  background: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {
  .product-details-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .search-bar {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 1rem;
  }

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

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

  .size-options {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }

  .product-actions {
    flex-direction: column;
  }

  .size-guide-content {
    margin: 1rem;
    width: calc(100% - 2rem);
    padding: 1.5rem;
  }

  .size-guide-tables {
    grid-template-columns: 1fr;
  }

  .size-table table {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .product-details-container {
    padding: 1rem;
  }

  .product-details-content {
    padding: 1rem;
  }

  /* Hide description image on mobile */
  .prod-desc-image {
    display: none;
  }

  /* Hide shipping info on mobile */
  .shipping-info {
    display: none;
  }

  /* Show view description image button on mobile */
  .view-desc-image-btn {
    display: flex !important;
  }

  .size-options {
    grid-template-columns: repeat(4, 1fr);
  }

  .quantity-selector {
    width: 100%;
  }

  .quantity-input {
    flex: 1;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-details-content {
  animation: fadeIn 0.5s ease forwards;
}
/* Star Rating Styles */
.star-rating {
  display: inline-block;
  font-size: 24px;
  unicode-bidi: bidi-override;
  direction: ltr;
}

.star {
  display: inline-block;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 2px;
}

.star.filled {
  color: #ffc107;
}

.star.half:after {
  content: "★";
  color: #ffc107;
  position: absolute;
  margin-left: -1em;
  width: 0.5em;
  overflow: hidden;
}

/* For interactive star rating in review form */
.star-rating .star {
  cursor: pointer;
}

.star-rating .star.selected,
.star-rating .star.hover {
  color: #ffc107;
}

/* For displayed ratings (non-interactive) */
.product-rating .stars {
  display: inline-block;
}

.product-rating .star {
  cursor: default;
}

/* Review section styles */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.review-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 100px;
  margin-bottom: 16px;
  font-family: inherit;
}

.submit-review {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.submit-review:hover {
  background-color: #555;
}

/* Existing styles */
.wishlist-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}
.wishlist-icon {
  position: relative;
}
/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 4px;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateX(200%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  align-items: center;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #4caf50;
}

.notification.error {
  background-color: #f44336;
}

.notification.info {
  background-color: #2196f3;
}

.notification-icon {
  margin-right: 10px;
  font-size: 20px;
}

/* Cart Success Modal Styles */
.cart-success-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.cart-success-modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 8% auto;
    padding: 35px 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.4s ease;
}

.success-icon-wrapper {
    margin-bottom: 20px;
}

.success-checkmark {
    display: inline-block;
    animation: scaleIn 0.5s ease;
}

.cart-success-modal-content h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #0b6623;
}

.success-message {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    font-weight: 500;
}

.product-preview {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.product-preview img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.product-preview-details {
    flex: 1;
}

.product-preview-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 5px;
}

.product-preview-brand {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.product-preview-price {
    font-weight: 700;
    color: #8B0000;
    font-size: 16px;
}

.product-preview-qty {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.primary-btn,
.secondary-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn {
    background: linear-gradient(135deg, #8B0000 0%, #a00000 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.primary-btn svg {
    stroke: white;
}

.secondary-btn {
    background: white;
    color: #8B0000;
    border: 2px solid #8B0000;
}

.secondary-btn:hover {
    background: #f8f8f8;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .cart-success-modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 25px 20px;
    }
    
    .cart-success-modal-content h2 {
        font-size: 24px;
    }
    
    .product-preview {
        padding: 15px;
    }
    
    .product-preview img {
        width: 60px;
        height: 60px;
    }
}