@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
@import url('./variables.css');

/* Global Styles */
body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
}

/* Custom Utilities */
.transition {
  transition: all var(--transition-fast);
}
.hover-opacity-75:hover {
  opacity: 0.75 !important;
}
.hover-opacity-100:hover {
  opacity: 1 !important;
}
.letter-spacing-1 {
  letter-spacing: 1px;
}

/* Hide spinners for quantity inputs */
.sc-qty-no-spinners::-webkit-outer-spin-button,
.sc-qty-no-spinners::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sc-qty-no-spinners {
  -moz-appearance: textfield;
}

/* Header & Navigation */
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  letter-spacing: -0.5px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  margin-right: 8px;
}

.sc-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Header Logo */
.sc-header-logo {
  width: 95px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
  display: block;
}

@media (min-width: 992px) {
  .sc-header-logo {
    width: 110px;
  }
}


/* Header Search */
.header-search input {
  border-radius: var(--radius-pill);
  padding-left: 1.25rem;
  border-color: var(--border-color);
  background-color: var(--bg-muted);
}
.header-search input:focus {
  background-color: var(--bg-surface);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(217, 37, 37, 0.15);
}

/* Cart Badge Button */
.btn-cart-nav {
  position: relative;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.2rem;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
  border: 1px solid rgba(217, 37, 37, 0.2);
  transition: var(--transition-fast);
}
.btn-cart-nav:hover {
  background-color: var(--primary-color);
  color: var(--text-inverse);
}
.cart-count-badge {
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  padding: 0.2em 0.55em;
  margin-left: 6px;
}
.btn-cart-nav:hover .cart-count-badge {
  background-color: white;
  color: var(--primary-color);
}

/* Hero Carousel */
.sc-carousel {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sc-carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.sc-carousel-item {
  display: none;
  width: 100%;
  transition: opacity 0.5s ease-in-out;
}
.sc-carousel-item.active {
  display: block;
}

.sc-carousel-control {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: var(--transition-fast);
  cursor: pointer;
  z-index: 10;
}
.sc-carousel-control:hover {
  opacity: 1;
  background-color: var(--primary-color) !important;
}

.sc-carousel-dots .dot-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  transition: var(--transition-fast);
  cursor: pointer;
}
.sc-carousel-dots .dot-btn.active,
.sc-carousel-dots .dot-btn:hover {
  background-color: var(--primary-color);
  width: 28px;
  border-radius: var(--radius-pill);
}

/* Buttons */
.btn-primary-sc {
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: var(--transition-fast);
}
.btn-primary-sc:hover {
  background-color: var(--primary-hover);
  color: var(--text-inverse);
}

.btn-outline-sc {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: var(--transition-fast);
}
.btn-outline-sc:hover {
  background-color: var(--primary-color);
  color: var(--text-inverse);
}

/* Category Chips */
.category-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}
.category-scroll-wrapper::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}
.category-chip:hover, .category-chip.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Product Card */
.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(217, 37, 37, 0.3);
}

.product-img-wrapper {
  aspect-ratio: 4 / 3;
  background-color: var(--bg-muted);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}
.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.product-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.025rem;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-title:hover {
  color: var(--primary-color);
}

.price-mrp {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-right: 6px;
}
.price-current {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.15rem;
}

/* Discount Global Notice Banner */
.global-discount-bar {
  background: linear-gradient(90deg, #d92525 0%, #b81c1c 100%);
  color: white;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Footer */
.sc-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  margin-top: 4rem;
}
.sc-footer h5 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}
.sc-footer a {
  color: #cbd5e1;
  text-decoration: none;
}
.sc-footer a:hover {
  color: var(--secondary-color);
}
.sc-footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.875rem;
}

/* --- Phase 11 UX Fix Enhancements --- */

/* Fix 3: Touch-friendly quantity controls (approx 44px touch height on mobile) */
@media (max-width: 767.98px) {
  .input-group .btn-sm,
  .input-group .btn {
    min-height: 42px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
  }
  .input-group input[type="number"] {
    min-height: 42px;
    font-size: 1rem;
    font-weight: 600;
  }
}

/* Fix 4: Mobile compact shop table adjustments */
@media (max-width: 575.98px) {
  .sc-category-accordion .table th,
  .sc-category-accordion .table td {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    font-size: 0.85rem;
  }
  .sc-category-accordion .table .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.775rem;
  }
}

/* Fix 7: Mobile Category Horizontal Scroll Hint */
.category-scroll-wrapper {
  position: relative;
}
@media (max-width: 767.98px) {
  .category-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(90deg, rgba(248, 249, 250, 0) 0%, rgba(248, 249, 250, 0.9) 100%);
    pointer-events: none;
    z-index: 2;
  }
}

/* Phase 20 - Category Slider */
.sc-category-slider-wrapper {
  position: relative;
  width: 100%;
}
.sc-category-slider {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
  gap: 1rem;
  padding: 0.5rem 0;
}
.sc-category-slider::-webkit-scrollbar {
  display: none;
}
.sc-category-slider-item {
  scroll-snap-align: start;
  flex: 0 0 calc(100% / 2.8); /* Mobile: ~2.5-3 visible */
}
@media (min-width: 576px) {
  .sc-category-slider-item { flex: 0 0 calc(100% / 3.8); }
}
@media (min-width: 768px) {
  .sc-category-slider-item { flex: 0 0 calc(100% / 4.8); }
}
@media (min-width: 992px) {
  .sc-category-slider-item { flex: 0 0 calc(100% / 7.5); }
}

/* Circular Category Item */
.sc-category-circle-link:hover .sc-category-circle {
  border-color: var(--primary-color) !important;
  box-shadow: 0 4px 15px rgba(122,7,23,0.15) !important;
  transform: translateY(-3px);
}
.sc-category-circle-link:hover h6 {
  color: var(--primary-color) !important;
}
.sc-category-circle-link:hover i {
  color: var(--primary-color) !important;
}
.sc-category-circle {
  width: 80px;
  height: 80px;
  background-color: white;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
@media (min-width: 768px) {
  .sc-category-circle {
    width: 100px;
    height: 100px;
  }
}

.sc-slider-btn {
  width: 36px;
  height: 36px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}
.sc-slider-btn:hover {
  background-color: var(--primary-color);
  color: white;
}
.sc-slider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sc-slider-prev {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}
.sc-slider-next {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
}

/* How to Order Distinct Step Cards */
.how-to-order-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.how-to-order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(122, 7, 23, 0.08) !important;
  border-color: var(--accent-gold) !important;
}

/* Quick Shop Page Styles */
.qs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.qs-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}
.qs-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  background-color: white;
}
.qs-table tbody tr:hover td {
  background-color: #fffdf5;
}
.qs-qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  overflow: hidden;
  height: 36px;
}
.qs-qty-btn {
  width: 32px;
  height: 100%;
  border: none;
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}
.qs-qty-btn:hover {
  background: var(--primary-color);
  color: white;
}
.qs-qty-input {
  width: 48px;
  height: 100%;
  border: none;
  text-align: center;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.9rem;
  padding: 0;
}
.qs-qty-input::-webkit-inner-spin-button,
.qs-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qs-qty-input[type=number] {
  -moz-appearance: textfield;
}
.qs-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  border-top: 2px solid var(--accent-gold);
  box-shadow: 0 -6px 25px rgba(0,0,0,0.1);
  z-index: 1040;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (max-width: 767.98px) {
  .qs-desktop-table {
    display: none !important;
  }
  .qs-mobile-list {
    display: block !important;
  }
}
@media (min-width: 768px) {
  .qs-desktop-table {
    display: table !important;
  }
  .qs-mobile-list {
    display: none !important;
  }
}

