/* BVMart - Seashell Products E-commerce Stylesheet */

/* ===== CSS Variables ===== */
:root {
  --color-primary: #0891b2; /* Cyan 600 - Ocean Blue */
  --color-primary-dark: #0e7490; /* Cyan 700 */
  --color-primary-light: #06b6d4; /* Cyan 500 */
  --color-secondary: #f59e0b; /* Amber 500 - Sandy */
  --color-secondary-dark: #d97706; /* Amber 600 */
  --color-accent: #14b8a6; /* Teal 500 */
  --color-text: #1f2937; /* Gray 800 */
  --color-text-light: #6b7280; /* Gray 500 */
  --color-bg: #ffffff;
  --color-bg-light: #f9fafb; /* Gray 50 */
  --color-border: #e5e7eb; /* Gray 200 */
  --color-success: #10b981; /* Green 500 */
  --color-rating: #fbbf24; /* Yellow 400 */
  
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

/* ===== Layout Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== Header ===== */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background-color: var(--color-primary);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  text-align: center;
}

.header-main {
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.logo img {
  height: 50px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

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

.search-icon,
.cart-icon {
  padding: 0.5rem;
  color: var(--color-text-light);
  font-size: 1.25rem;
}

.search-icon:hover,
.cart-icon:hover {
  color: var(--color-primary);
}

/* ===== Breadcrumbs ===== */
.breadcrumb {
  padding: 1rem 0;
  background-color: var(--color-bg-light);
}

.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.breadcrumb-nav a {
  color: var(--color-primary);
}

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

.breadcrumb-nav span {
  color: var(--color-text-light);
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #14b8a6 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-align: center;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: white;
  color: var(--color-primary);
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: transparent;
  color: white;
}

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

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

.btn-add-cart {
  background-color: var(--color-primary);
  color: white;
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
}

.btn-add-cart:hover {
  background-color: var(--color-primary-dark);
}

/* ===== Category Cards ===== */
.categories-section {
  padding: 4rem 0;
  background-color: var(--color-bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.category-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.category-image {
  height: 250px;
  background: linear-gradient(135deg, #0891b2, #14b8a6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  opacity: 0.9;
}

.category-content {
  padding: 1.5rem;
}

.category-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.category-description {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

/* ===== Product Grid ===== */
.products-section {
  padding: 4rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
}

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

.product-image {
  height: 280px;
  overflow: hidden;
  background-color: var(--color-bg-light);
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--color-secondary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.product-info {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.stars {
  display: flex;
  gap: 0.125rem;
  color: var(--color-rating);
}

.review-count {
  color: var(--color-text-light);
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* ===== Product Detail Page ===== */
.product-detail {
  padding: 3rem 0;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

/* Product Gallery */
.product-gallery {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.thumbnail {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--color-primary);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product-detail-info h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.product-sku {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.product-detail-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.product-description {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.product-features {
  background-color: var(--color-bg-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.product-features h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

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

.product-features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.product-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.product-actions {
  margin-bottom: 2rem;
}

/* Specifications Table */
.specifications-section {
  margin-bottom: 3rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.specs-table tr {
  border-bottom: 1px solid var(--color-border);
}

.specs-table th,
.specs-table td {
  padding: 1rem;
  text-align: left;
}

.specs-table th {
  background-color: var(--color-bg-light);
  font-weight: 600;
  width: 30%;
}

/* Reviews Section */
.reviews-section {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 2px solid var(--color-border);
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.reviews-summary {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-lg);
}

.rating-overview {
  text-align: center;
}

.rating-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.rating-stars {
  font-size: 1.5rem;
  color: var(--color-rating);
  margin: 0.5rem 0;
}

.rating-count {
  color: var(--color-text-light);
}

.rating-bars {
  flex: 1;
}

.rating-bar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.rating-bar-label {
  font-size: 0.875rem;
  width: 60px;
}

.rating-bar {
  flex: 1;
  height: 8px;
  background-color: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background-color: var(--color-rating);
  transition: var(--transition);
}

.rating-bar-count {
  font-size: 0.875rem;
  color: var(--color-text-light);
  width: 40px;
  text-align: right;
}

/* Individual Review */
.review-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.reviewer-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.reviewer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.reviewer-details h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.review-date {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.review-rating {
  color: var(--color-rating);
}

.review-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.review-text {
  line-height: 1.8;
  color: var(--color-text);
}

.review-helpful {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.helpful-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--color-text);
}

.helpful-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: white;
  color: var(--color-text);
  font-weight: 500;
}

.page-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Q&A Section */
.qa-section {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 2px solid var(--color-border);
}

.qa-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.question {
  margin-bottom: 1rem;
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.qa-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.question-text {
  flex: 1;
  font-weight: 600;
  font-size: 1.125rem;
}

.question-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-left: 3rem;
}

.answer {
  margin-left: 3rem;
  padding: 1rem;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.answer-header {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.answer-text {
  line-height: 1.8;
}

.answer-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-light);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-text);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
  
  .product-gallery {
    position: static;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .reviews-summary {
    flex-direction: column;
    gap: 2rem;
  }
  
  .product-detail-price {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container,
  .container-wide {
    padding: 0 0.75rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }

/* ===== Toggle Buttons for Reviews and Q&A ===== */
.toggle-buttons-container {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 200px;
}

.btn-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-toggle:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-toggle:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ===== Hidden Sections Transition ===== */
.reviews-section.hidden,
.qa-section.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reviews-section:not(.hidden),
.qa-section:not(.hidden) {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

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

/* ===== Print Styles ===== */
@media print {
  .site-header,
  .site-footer,
  .btn,
  .breadcrumb,
  .reviews-section,
  .qa-section {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  .product-layout {
    grid-template-columns: 1fr;
  }
}
