/* 
  American Cravz - Premium Spices & Seasoning 
  Enhanced Professional Stylesheet
*/

:root {
  /* Artisanal Color Palette (V8 Unified) */
  --primary-color: #242F43;
  /* Logo Dark Slate/Navy */
  --primary-light: #374766;
  /* Softer Slate */
  --secondary-color: #f5f5f4;
  /* Very subtle warm gray */
  --accent-gold: #242F43;
  /* Unified to Primary */
  --accent-gold-hover: #1a2233;
  --accent-red: #242F43;
  /* Unified to Primary */

  /* Text Colors */
  --text-dark: #242F43;
  --text-body: #475569;
  /* Slightly darker slate for better contrast */
  --text-light: #faf9f6;
  --text-muted: #64748b;

  /* Backgrounds */
  --bg-color: #faf9f6;
  /* Organic Cream/Off-White Base */
  --bg-card: #ffffff;
  /* Pure White for pop */
  --bg-dark: #242F43;
  /* Dark Footer */
  /* Alternate slightly cooler stone section */

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --max-width: 1350px;
  --header-height: 90px;

  /* Borders & Shadows */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
  --shadow-glow: 0 0 30px rgba(36, 47, 67, 0.2);

  /* Transitions */
  --transition-fast: 0.2s ease-out;
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background-color: var(--bg-color);
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.15;
}

h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-gold {
  color: var(--accent-gold);
}

.text-red {
  color: var(--accent-red);
}

.bg-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.bg-secondary {
  background-color: var(--secondary-color);
}

.bg-subtle {
  background-color: var(--bg-subtle);
}

.subtitle {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.italic-serif {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  color: var(--primary-color);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
}

.product-item .btn {
  display: inline-block;
}

/* Button Background slide effect */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: width var(--transition-normal);
  z-index: -1;
}

.btn:hover::before {
  width: 100%;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-gold:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline-white {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: transparent;
}

.btn-outline-white:hover {
  border-color: #fff;
  background: #fff;
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Header - Floating Premium Design
   ========================================================================== */
.main-header.floating-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: var(--max-width);
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-radius: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all var(--transition-normal);
  padding: 0;
}

.main-header.floating-header.scrolled {
  top: 0.5rem;
  width: 95%;
  height: 70px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15);
}

/* Base states for links/logo (Always Dark for maximum contrast) */
.main-header .nav-links a {
  color: var(--primary-color) !important;
  font-size: 0.95rem;
  font-weight: 700;
  position: relative;
  padding: 0.5rem 0;
}

.main-header .mobile-menu-toggle {
  color: var(--primary-color) !important;
  font-size: 1.5rem;
  padding: 0.5rem;
}

.main-header .logo img {
  height: 55px;
  /* Increased height for better visibility */
  transition: var(--transition-normal);
}

.main-header.scrolled .logo img {
  height: 40px;
}

/* General Layouts */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.desktop-nav .nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-gold);
  transition: var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Menu */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-nav-links a {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  transition: color var(--transition-fast);
}

.mobile-nav-links a:hover {
  color: var(--accent-gold);
}

@media (max-width: 992px) {

  .desktop-nav,
  .header-btn {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==========================================================================
   Sections & Features
   ========================================================================== */
section {
  padding: 7rem 0;
  position: relative;
}

.hero-section {
  padding: 0 !important;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1.5rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-body);
}

/* Professional Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 3rem;
  width: 100%;
  max-width: 300px;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  height: 1px;
  width: 40%;
  background: linear-gradient(to right, transparent, rgba(36, 47, 67, 0.4), transparent);
}

.section-divider-icon {
  color: var(--accent-gold);
  font-size: 1.25rem;
  margin: 0 1.5rem;
  opacity: 0.8;
  animation: subtlyFloat 4s ease-in-out infinite;
}

/* Premium Card */
.premium-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.premium-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(36, 47, 67, 0.3);
}

/* Icon Wrapper */
.icon-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(36, 47, 67, 0.08) 0%, rgba(36, 47, 67, 0.04) 100%);
  border: 1px solid rgba(36, 47, 67, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-gold);
  transition: transform var(--transition-normal);
}

.premium-card:hover .icon-circle {
  transform: scale(1.1);
  background: var(--accent-gold);
  color: #fff;
}

/* ==========================================================================
   Products Grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
}

.product-item {
  position: relative;
  background: transparent;
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
  text-align: center;
}

.product-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
  z-index: -1;
  top: 30%;
  /* Box only covers the bottom part */
}

.product-item:hover::before {
  box-shadow: var(--shadow-lg);
  top: 10%;
}

.product-img {
  position: relative;
  height: 350px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img img {
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.25));
  transition: all var(--transition-slow);
  transform: translateY(0);
}

.product-item:hover .product-img img {
  transform: translateY(-15px) scale(1.05);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35));
}

.product-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.product-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.product-item .btn {
  opacity: 0;
  transform: translateY(10px);
  width: 100%;
}

.product-item:hover .btn {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Keyframes */
@keyframes subtlyFloat {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

.floating {
  animation: subtlyFloat 6s ease-in-out infinite;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: #fff;
  padding: 6rem 0 2rem;
  border-top: 4px solid var(--accent-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
}

.footer-links a::before {
  content: '→';
  margin-right: 0.5rem;
  color: var(--accent-gold);
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition-normal);
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(5px);
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--accent-gold);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p,
.footer-bottom a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ==========================================================================
   Swiper Custom Styles
   ========================================================================== */
.hero-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 10px;
  height: 10px;
  transition: all var(--transition-fast);
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--accent-gold);
  width: 30px;
  border-radius: 5px;
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
  font-size: 1.5rem;
}

.slide-content {
  transform: translateY(30px);
}

/* ==========================================================================
   Mobile Polish & Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem !important;
  }

  h2 {
    font-size: 2rem !important;
  }

  section {
    padding: 4rem 0;
  }

  .hero-section {
    min-height: 80vh;
    padding: 0 !important;
  }

  .hero-section .container {
    padding-top: 6rem;
  }

  .btn {
    padding: 0.8rem 1.8rem;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    display: block;
  }

  .btn-outline-white {
    margin-top: 0.5rem;
  }

  .product-grid {
    gap: 1.5rem;
  }

  /* Show buttons by default on mobile since there is no hover */
  .product-item .btn {
    opacity: 1;
    transform: translateY(0);
    margin-top: 1rem;
  }

  .main-header.floating-header {
    width: 94%;
    top: 1rem;
    height: 70px;
    padding: 0;
    border-radius: 35px;
  }

  .main-header.floating-header.scrolled {
    width: 98%;
    top: 0.5rem;
    height: 65px;
  }

  .logo img {
    height: 35px !important;
  }

  .main-header.scrolled .logo img {
    height: 35px !important;
  }

  .premium-card {
    padding: 2rem 1.5rem;
  }

  .page-header {
    padding: 5rem 0 !important;
  }
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}