/* ============================================================
   DERMANALIBABA — Modern E-commerce Theme
   Based on Bootstrap 5
   ============================================================ */

/* ─── CSS Variables ─────────────────────────────── */
:root {
  --primary: #4a7c59; /* Soft organic green */
  --primary-dark: #35583f;
  --primary-light: #6a9c79;
  --accent: #d4af37; /* Elegant gold */
  --accent-dark: #b5952f;
  --bg-light: #fdfbf7; /* Very light cream/earthy background */
  --text-dark: #2c3e2e;
  --text-muted: #6c757d;
  
  --bs-primary: var(--primary);
  --bs-primary-rgb: 74, 124, 89;
  --bs-secondary: var(--accent);
  --bs-secondary-rgb: 212, 175, 55;
  --bs-body-bg: var(--bg-light);
  --bs-body-color: var(--text-dark);
  --bs-font-sans-serif: 'Inter', sans-serif;
  
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 10px 30px rgba(74, 124, 89, 0.15);
  --transition: all 0.3s ease;
}

body {
  font-family: var(--bs-font-sans-serif);
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  -webkit-font-smoothing: antialiased;
}

/* ─── Custom Colors & Utilities ─────────────────────────────── */
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-dark { background-color: var(--primary-dark) !important; }
.bg-accent { background-color: var(--accent) !important; }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-dark { color: var(--text-dark) !important; }

.hover-primary:hover { color: var(--primary) !important; transition: var(--transition); }
.hover-accent:hover { color: var(--accent) !important; transition: var(--transition); }
.hover-lift { transition: var(--transition); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.tracking-wider { letter-spacing: 0.1em; }
.transition { transition: var(--transition); }
.transition-transform { transition: transform 0.4s ease; }

/* ─── Top Bar & Header ─────────────────────────────── */
.top-bar {
  font-size: 0.85rem;
  font-weight: 500;
}
.middle-bar .logo {
  font-family: 'Inter', sans-serif;
}
.search-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(74, 124, 89, 0.25);
}
.action-icon .badge {
  font-size: 0.65rem;
  padding: 0.25em 0.4em;
}
.bottom-nav .nav-link {
  font-weight: 600;
  padding: 1rem 1.5rem;
}
.bottom-nav .nav-link:hover, .bottom-nav .nav-link.active {
  color: var(--accent) !important;
}
.dropdown-menu {
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
}
.dropdown-item:hover {
  background-color: rgba(74, 124, 89, 0.1);
  color: var(--primary);
}

/* ─── Hero Swiper ─────────────────────────────── */
.hero-section {
  height: 600px;
  max-height: 80vh;
}
@media (min-width: 992px) {
  .hero-section {
    height: calc(100vh - 310px) !important;
    max-height: none !important;
  }
}
@media (max-width: 768px) {
  .hero-section { height: 500px; }
}
.hero-slide-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.hero-slide-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(44, 62, 46, 0.85) 0%, rgba(44, 62, 46, 0.3) 100%);
  z-index: 2;
}
.swiper-button-next, .swiper-button-prev {
  background: rgba(255,255,255,0.2);
  width: 50px; height: 50px;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  transition: var(--transition);
}
.swiper-button-next:hover, .swiper-button-prev:hover {
  background: var(--primary);
}
.swiper-button-next:after, .swiper-button-prev:after {
  font-size: 1.2rem;
}
.swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}
.swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

/* ─── Buttons ─────────────────────────────── */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background-color: var(--primary);
  color: #fff;
}

/* ─── Categories ─────────────────────────────── */
.category-circle {
  width: 100px;
  height: 100px;
}
.category-card-link:hover .category-circle {
  background-color: var(--primary) !important;
}
.category-card-link:hover .category-circle i {
  color: #fff !important;
}
.category-card-link:hover h6 {
  color: var(--primary) !important;
}

/* ─── Product Card ─────────────────────────────── */
.product-card {
  transition: var(--transition);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover) !important;
}
.product-card:hover .product-actions {
  opacity: 1 !important;
}
.product-card:hover img {
  transform: scale(1.05);
}
.product-title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;  
  overflow: hidden;
  height: 2.8em;
}

/* ─── Blog Card ─────────────────────────────── */
.blog-card-hover {
  transition: var(--transition);
}
.blog-card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover) !important;
}
.blog-card-hover:hover img {
  transform: scale(1.05);
}

/* ─── Footer ─────────────────────────────── */
.footer-heading-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}
.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}
.social-icon-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}
.contact-info-list li i {
  width: 20px;
  text-align: center;
}

/* ─── Utilities ─────────────────────────────── */
.w-20px { width: 20px; }
.object-fit-cover { object-fit: cover; }
.object-fit-contain { object-fit: contain; }

/* ─── Checkout High-Contrast Selected Box ─── */
.checkout-selected-box {
  background-color: #f0f7f2 !important; /* Very soft light green background */
  border-color: var(--primary) !important;
  border-width: 2px !important;
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.1) !important;
}
.checkout-selected-box,
.checkout-selected-box * {
  color: #1a3320 !important; /* Dark green/almost black text */
}
.checkout-selected-box small,
.checkout-selected-box .text-muted {
  color: #35583f !important; /* Slightly lighter but very readable dark green text */
  opacity: 0.9;
}

/* ─── Features Strip ─── */
.features-strip {
  margin-top: -40px;
  border-radius: 1rem;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  background-color: #ffffff !important;
  border: 1px solid rgba(74, 124, 89, 0.15) !important;
  border-bottom: 4px solid var(--accent) !important; /* Elegant gold bottom border to prevent merging with categories */
  box-shadow: 0 10px 30px rgba(74, 124, 89, 0.12) !important; /* Premium organic green shadow */
  transition: var(--transition);
}
.features-strip:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(74, 124, 89, 0.18) !important;
}

/* ─── Premium Checkboxes and Radio Toggles ─── */
.form-check-input {
  cursor: pointer;
  border: 2px solid var(--primary-light) !important;
  width: 1.3em !important;
  height: 1.3em !important;
  transition: var(--transition);
}
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(74, 124, 89, 0.25) !important;
}
.form-check-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(74, 124, 89, 0.2) !important;
}
.form-check-label {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dark) !important;
  padding-left: 0.25rem;
}


/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: #ffffff;
    z-index: 1050;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@media (min-width: 768px) {
    .cookie-consent-banner {
        left: 50%;
        right: auto;
        transform: translate(-50%, 100%);
        width: 100%;
        max-width: 800px;
    }
}
.cookie-consent-banner.show {
    opacity: 1;
    transform: translateY(0);
}
@media (min-width: 768px) {
    .cookie-consent-banner.show {
        transform: translate(-50%, 0);
    }
}


/* Glassmorphism & Micro Animations */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.cookie-consent-banner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.96);
}

/* Add a subtle shine effect on primary buttons */
.btn-primary::after, .btn-accent::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
}

.btn-primary:hover::after, .btn-accent:hover::after {
    left: 150%;
}

.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(74, 124, 89, 0.15) !important;
}

.product-card .btn-add-cart {
    transition: all 0.3s ease;
    transform: translateY(10px);
    opacity: 0;
}

.product-card:hover .btn-add-cart {
    transform: translateY(0);
    opacity: 1;
}
