/* --- CSS Variables & Global Reset --- */
:root {
    --bg-body: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --text-main: #282c3f;
    --text-muted: #7e818c;
    --text-light: #94969f;
    --accent: #ff3f6c;
    --accent-hover: #e63961;
    --border-light: #eaeaec;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Syne', sans-serif;
    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --nav-height: 70px;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    padding-bottom: 80px;
    /* Space for mobile bottom nav */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

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

ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* --- Utilities --- */
.text-accent {
    color: var(--accent) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
    color: white;
}

.fw-extra-bold {
    font-weight: 800;
}

.letter-spacing-1 {
    letter-spacing: 0.05em;
}

.letter-spacing-2 {
    letter-spacing: 0.1em;
}

.section-padding {
    padding: 50px 0;
}

/* --- Promo Banner --- */
.promo-banner {
    background: var(--text-main);
    color: white;
    text-align: center;
    padding: 6px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1060;
    position: relative;
}

.homepage-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--text-main);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

/* --- PERFECT HEADER --- */
.navbar {
    height: var(--nav-height);
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.navbar-scrolled {
    box-shadow: var(--shadow-subtle);
    height: calc(var(--nav-height) - 10px);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

/* 1. Brand */
.navbar-brand img{
    width: 232px;
    margin-top: 5px;
}

.dropdown-item {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dropdown-item:hover { background: #f5f5f7; color: var(--brand-color); }
.navbar-nav .dropdown-menu{
    position: absolute;
}
.dropdown-toggle::after {
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}

@media (min-width: 992px) {
    .navbar-brand img{
        width: 180px;
        margin-top: 5px;
    }
}
@media (max-width: 768px) {
    .navbar-brand img{
        width: 180px;
    }
    .dropdown-menu.show {
        display: block;
        position: unset;
        border: none;
    }
}

/* 2. Search (Center) */
.desktop-search-wrapper {
    flex-grow: 1;
    max-width: 400px;
    margin-right: 18px;
    position: relative;
    display: none;
}

@media (min-width: 992px) {
    .desktop-search-wrapper {
        display: block;
    }
}

.search-container {
    background: #f0f0f2;
    border-radius: var(--radius-full);
    padding: 8px 24px;
    width: 100%;
    border: 1px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.search-container:focus-within {
    background: white;
    border-color: var(--text-main);
    box-shadow: 0 0 0 4px rgba(40, 44, 63, 0.08);
}

.search-input {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    width: 100%;
    color: var(--text-main);
}

.search-input:focus {
    outline: none;
}

/* Search Dropdown Results (Updated for Products) */
.desktop-search-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    padding: 15px;
    z-index: 1100;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
    max-height: 450px;
    overflow-y: auto;
}

.desktop-search-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Search Result Item Styles */
.search-result-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 15px 0 10px;
    letter-spacing: 1px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.search-tag {
    background: #f5f5f7;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-tag:hover {
    background: #e0e0e2;
}

/* Product Result Card */
.search-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.search-product-item:hover {
    background: #f9f9f9;
}

.search-prod-img {
    width: 40px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.search-prod-info {
    display: flex;
    flex-direction: column;
}

.search-prod-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.search-prod-price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 3. Desktop Nav Actions (Right) */
.desktop-nav-actions {
    display: none;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .desktop-nav-actions {
        display: flex;
    }
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-main);
    padding: 5px 0 !important;
    position: relative;
}

.nav-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-main);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
}

.nav-icon-btn:hover {
    color: var(--accent);
}

.nav-icon-btn i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--accent);
    color: white;
    font-size: 0.6rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Header Actions */
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (min-width: 992px) {
    .mobile-header-actions {
        display: none;
    }
}

.icon-btn-mobile {
    font-size: 1.2rem;
    color: var(--text-main);
    background: #f5f5f7;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.icon-btn-mobile:active {
    transform: scale(0.9);
}

.navbar-toggler {
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    align-items: center;
}

.navbar-toggler span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Menu */
.navbar-collapse {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 20px;
    box-shadow: var(--shadow-hover);
    z-index: 1050;
}

.nav-item-mobile {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f2;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Mobile Search Overlay */
#mobileSearchOverlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    overflow-y: auto;
}

#mobileSearchOverlay.active {
    transform: translateY(0);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* --- Mobile Bottom Nav --- */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none;
    }
}

.nav-item-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    flex: 1;
    height: 60px;
    transition: 0.2s;
}

.nav-item-bottom i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: 0.2s;
}

.nav-item-bottom.active {
    color: var(--accent);
}

.nav-item-bottom.active i {
    transform: translateY(-3px);
}

/* --- Components --- */
.product-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: transparent;
    transform: translateY(-4px);
}

.prod-img-box {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f8f8f8;
}

.prod-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.badge-prod {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--text-main);
    color: white;
    font-size: 0.6rem;
    padding: 4px 8px;
    text-transform: uppercase;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.5px;
    border-radius: 2px;
}

.badge-prod.sale {
    background: var(--accent);
}

.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    color: var(--text-muted);
    transition: 0.2s;
}

.btn-wishlist:hover {
    color: var(--accent);
    background: white;
    transform: scale(1.1);
}

.btn-wishlist.active {
    color: var(--accent);
    background: white;
}

.prod-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(100%);
    transition: var(--transition);
    display: flex;
    gap: 10px;
    justify-content: center;
}

.product-card:hover .prod-actions {
    transform: translateY(0);
}

@media (hover: none) {
    .prod-actions {
        transform: translateY(0);
    }
}

.btn-quick-add {
    background: var(--text-main);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    transition: 0.2s;
    width: 100%;
}

.btn-quick-add:hover {
    background: var(--accent);
}

.prod-details {
    padding: 12px;
    text-align: center;
}

.prod-name {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 6px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prod-price {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #fafbfc;
    padding: 60px 0 30px;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
}

.footer-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: 1px;
}

.footer-link {
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-icons a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    margin-right: 10px;
    box-shadow: var(--shadow-subtle);
    transition: 0.2s;
}

.social-icons a:hover {
    background: var(--text-main);
    color: white;
    transform: translateY(-3px);
}

/* Utilities */
.toast-container {
    z-index: 2100;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    border: 1px solid var(--border-light);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
    background: white;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

.brand-section {
    background: #fcfcfc;
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.brand-logo {
    height: 30px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.3s;
}

.brand-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Carousel Controls */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-image: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure pseudo-elements are visible and centered */
.carousel-control-prev-icon::before,
.carousel-control-next-icon::before {
    font-family: "bootstrap-icons";
    font-size: 1.2rem;
    line-height: 1;
    display: block;
    color: #1a1a1a;
}

.carousel-control-prev-icon::before {
    content: "\f284"; /* chevron-left */
}

.carousel-control-next-icon::before {
    content: "\f285"; /* chevron-right */
}


/* Newsletter */
.newsletter-section {
    background: var(--text-main);
    color: white;
    padding: 70px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 63, 108, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.form-newsletter {
    max-width: 450px;
    margin: 0 auto;
    position: relative;
}

.input-newsletter {
    width: 100%;
    padding: 16px 24px;
    padding-right: 140px;
    border-radius: var(--radius-full);
    border: none;
    font-family: var(--font-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-newsletter {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: 0.2s;
}

.btn-newsletter:hover {
    background: white;
    color: var(--accent);
}

/* Enhanced Pagination */
.pagination {
    justify-content: center;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.pagination .page-item.active .page-link {
    background: #000;
    color: white;
    border-color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pagination .page-link:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    border-color: #000;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-container {
    margin-top: 40px;
}

.pagination .page-link {
    color: var(--text-main);
    border: none;
    margin: 0 3px;
    border-radius: var(--radius-sm);
}

.pagination .page-item.active .page-link {
    background: var(--text-main);
}

.pagination .page-link:hover {
    background: var(--bg-light);
}

/* Base styles for the select dropdown */
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  max-width: 280px;
  padding: 12px 40px 12px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #333;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Hover state */
.sort-select:hover {
  border-color: #bbb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Focus state */
.sort-select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Disabled state */
.sort-select:disabled {
  color: #999;
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Option styles - limited styling for options across browsers */
.sort-select option {
  padding: 10px;
  color: #333;
}

/* Container for additional styling if needed */
.form-select-container {
  position: relative;
  display: inline-block;
  margin: 10px 0;
}

/* Optional: Add a label for accessibility */
.form-select-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

/* Responsive design */
@media (max-width: 768px) {
  .sort-select {
    max-width: 100%;
  }
}

/* Animation for the dropdown arrow */
.sort-select:active {
  transform: translateY(1px);
}
