/* ===============================
   ROOT VARIABLES & TYPOGRAPHY
================================= */

:root {
  --brown-primary: #ff912f;
  --brown-light: #ff912f;
  --brown-dark: #e6710c;
  --brown-bg-light: #fff4e6;
  --text-dark: #111827;
  --text-muted: #6b7280;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --border-light: rgba(0, 0, 0, 0.08);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Fraunces", serif;
}

body, p, li, span, a, div {
  font-family: "Lato", sans-serif;
}

/* ===============================
   UTILITY CLASSES
================================= */

/* Text & Background Colors */
.text-brown-primary { color: var(--brown-primary) !important; }
.text-brown-light { color: var(--brown-light) !important; }
.text-brown-dark { color: var(--brown-dark) !important; }
.bg-brown-light { background-color: var(--brown-bg-light) !important; }
.bg-brown-dark { background-color: var(--brown-dark) !important; }

/* ===============================
   COMPONENTS: BUTTONS
================================= */

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

.btn-brown-primary:hover {
  background-color: var(--brown-dark);
  border-color: var(--brown-dark);
}

.btn-outline-brown-primary {
  border-color: orange;
  color: var(--brown-primary);
}

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

.btn-custom {
  background-color: var(--brown-primary);
  color: var(--white);
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  transition: background 0.2s ease;
}

.btn-custom:hover {
  background-color: var(--brown-dark);
}

/* ===============================
   COMPONENTS: NAVIGATION
================================= */

.navbar-brand {
  color: var(--brown-primary) !important;
  font-weight: bold;
}

.nav-link {
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--brown-primary);
}

.icon-button svg {
  stroke: var(--text-dark);
  transition: stroke 0.3s ease;
}

.icon-button:hover svg {
  stroke: var(--brown-primary);
}

.cart-badge {
  background: var(--brown-primary);
  color: var(--white);
  font-size: 0.75rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.active-nav-link {
  font-weight: 600;
  color: var(--brown-primary) !important;
}

.z-custom {
  z-index: 2000 !important;
}

/* ===============================
   COMPONENTS: CARDS
================================= */

/* Product Cards */
.custom-product-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--border-light);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  overflow: hidden;
  height: 100%;
}

.custom-product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
}

.card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.trending-badge, .new-badge {
  background: #fef3c7;
  color: var(--brown-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.price-tag {
  font-size: 1rem;
  font-weight: 500;
  color: var(--brown-primary);
}

/* Category Cards */
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.category-img {
  transition: all 0.4s ease;
}

.category-card:hover .category-img {
  transform: scale(1.01);
}

.category-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 70%);
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.category-title {
  font-size: 1.5rem;
  transform: translateY(0);
  transition: transform 0.4s ease;
}

/* Category Hover Effects */
.category-card:hover {
  transform: translateY(-2px) scale(1.001);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

.category-card:hover .category-img {
  transform: scale(1.05);
  filter: brightness(0.8);
}

.category-card:hover .category-overlay {
  opacity: 0.9;
  transform: translateY(20px);
}

.category-card:hover .category-title {
  transform: translateY(-20px);
}

.category-card:hover .category-desc {
  transform: translateY(-20px);
}

.category-card:hover .category-count {
  transform: translateY(-20px);
}

.category-card:hover .category-badge {
  transform: translateY(-20px);
  opacity: 0;
}

/* Category Hover Effect */
.category-hover-effect {
  background: linear-gradient(135deg, var(--brown-primary) 5%, var(--brown-dark) 100%);
  opacity: 0.5;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 16px;
}

.category-card:hover .category-hover-effect {
  opacity: 0.6;
  transform: scale(1);
}

.category-hover-effect i {
  transform: translateX(-20px);
  transition: transform 0.4s ease 0.1s;
}

.category-card:hover .category-hover-effect i {
  transform: translateX(0);
}

.category-hover-effect p {
  transform: translateY(20px);
  opacity: 0.5;
  transition: all 0.4s ease 0.2s;
}

.category-card:hover .category-hover-effect p {
  transform: translateY(0);
  opacity: 0.8;
}

/* Focus state for accessibility */
.category-card:focus {
  outline: 2px solid var(--brown-primary);
  outline-offset: 2px;
}

/* ===============================
   COMPONENTS: TESTIMONIALS
================================= */

.testimonial-grid-track {
  display: flex;
  gap: 30px;
  animation: scrollHorizontal 40s linear infinite;
}

@keyframes scrollHorizontal {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-100% - 30px)); }
}

.testimonial-grid-slider:hover .testimonial-grid-track {
  animation-play-state: paused;
}

.testimonial-grid-item {
  flex: 0 0 auto;
  /* width: 25%; */
  min-width: 250px;
}

.testimonial-card {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 25px 20px;
  border: 1px solid rgba(120, 53, 15, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* ===============================
   COMPONENTS: HERO CAROUSEL
================================= */

.hero-carousel, .hero-carousel .carousel-item {
  /* padding-top: 60px; */
  /* margin-top: 40px; */
  height: 100vh;
}

.hero-title {
  font-size: 3rem;
}

.hero-subtitle {
  font-size: 1.25rem;
}

/* ===============================
   PAGES: CATEGORIES
================================= */

.categories-hero {
  background: linear-gradient(135deg, var(--brown-bg-light) 0%, rgba(255, 244, 230, 0.9) 100%);
  position: relative;
  overflow: hidden;
}

.min-vh-80 {
  min-height: 80vh;
}

/* ===============================
   PAGES: CONTACT
================================= */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Card hover effects for contact cards */
.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
}

/* Form focus states */
.form-control:focus, .form-select:focus {
  border-color: var(--brown-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 145, 47, 0.1);
}

/* ===============================
   PAGES: PRODUCT DETAILS
================================= */

.main-image {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.main-image.zoomed {
  cursor: zoom-out;
  transform: scale(1.5);
  z-index: 1000;
  position: relative;
}

.product-scroll-track {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-scroll-track::-webkit-scrollbar {
  display: none;
}

/* Related Products */
.related-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--border-light);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.related-img-container {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: var(--light-bg);
}

.related-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.related-card-body {
  padding: 1.5rem;
  flex-grow: 1;
}

.related-card-footer {
  padding: 0 1.5rem 1.5rem;
}

.related-card-link {
  color: inherit;
  display: block;
  flex-grow: 1;
}

.related-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.related-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.related-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.related-badge {
  background: var(--brown-bg-light);
  color: var(--brown-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
}

.related-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-primary);
}

.related-cart-btn {
  background: var(--brown-primary);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.3s ease;
  cursor: pointer;
}

.related-cart-btn:hover {
  background: var(--brown-dark);
}

/* ===============================
   PAGES: CHECKOUT
================================= */

.checkout-step.active .step-number {
  background-color: var(--brown-primary);
  color: white;
}

.checkout-step.completed .step-number {
  background-color: #28a745;
  color: white;
}

.payment-method-card {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-method-card:hover, .payment-method-card.selected {
  border-color: var(--brown-primary);
  background-color: var(--brown-bg-light);
}

.dropdown-toggle:focus {
  background-color: var(--brown-primary) !important;
  color: white !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--brown-dark) !important;
  color: white !important;
  border-radius: 0.375rem;
}

/* ===============================
   RESPONSIVE DESIGN
================================= */

/* Tablet */
@media (max-width: 992px) {
  .display-4 {
    font-size: 2.5rem;
  }
  
  .hero-carousel, .hero-carousel .carousel-item {
    /* padding-top: "100px"; */
    height: 70vh;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-carousel, .hero-carousel .carousel-item {
    height: 50vh;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn-lg {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
  }

  /* Category Cards */
  .category-title {
    font-size: 1.25rem !important;
  }

  .category-desc, .category-count, .category-badge span {
    font-size: 0.8rem !important;
  }

  .category-hover-effect p {
    font-size: 0.8rem !important;
  }

  .category-hover-effect i {
    font-size: 1.3rem !important;
  }

  .badge {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
  }
}

/* Small Mobile */
@media (max-width: 576px) {
  .display-4 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 1.75rem;
  }

  .btn-custom {
    font-weight: 300;
    font-size: 15px;
    padding: 5px 5px;
    border-radius: 10px;
  }

  .category-card {
    margin: 0 5px;
  }
  
  .category-overlay {
    padding: 1rem !important;
  }
  
  .category-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem !important;
  }
  
  .category-desc {
    font-size: 0.8rem;
    margin-bottom: 0.5rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .category-count {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 992px) {
  .category-overlay {
    padding: 1.5rem !important;
  }
  
  .category-title {
    font-size: 1.35rem;
  }
  
  .category-desc {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1200px) {
  .category-overlay {
    padding: 1.75rem !important;
  }
  
  .category-title {
    font-size: 1.4rem;
  }
  
  .category-desc {
    font-size: 0.92rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .category-overlay {
    padding: 2rem !important;
  }
  
  .category-title {
    font-size: 1.5rem;
  }
  
  .category-desc {
    font-size: 0.95rem;
  }
}

/* Ensure proper image scaling on all devices */
.ratio-4x3 {
  aspect-ratio: 4 / 3;
}

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

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .category-card:hover {
    transform: none;
  }
  
  .category-card:active {
    transform: scale(0.98);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .category-card,
  .category-img,
  .category-overlay {
    transition: none;
  }
  
  .category-card:hover .category-img {
    transform: none;
  }
  
  .testimonial-grid-track {
    animation: none;
  }
}