:root {
  --text: #2E1A47;
  --gray-900: #898989;
  --gray-100: #f3f4f6;
  --primary: #00CCFF;
  --primary-dark: #00AEEF;
  --accent: #FF0099;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: #ffffff;
  color: var(--text);
}

a {
  text-decoration: none;
  color: inherit;
}

.site-header {
  background: var(--gray-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 50px;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.header-nav > a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
  white-space: nowrap;
}

.header-nav > a:hover {
  color: var(--primary);
}

.header-nav .sale-link {
  color: var(--accent);
}

/* Navigation Dropdown in Header */
.header-nav .nav-dropdown {
  position: relative;
}

.header-nav .nav-dropdown .dropdown-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  transition: color 0.3s;
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.header-nav .nav-dropdown .dropdown-toggle:hover {
  color: var(--primary);
}

.header-nav .nav-dropdown .arrow {
  font-size: 0.7em;
  margin-left: 4px;
}

.header-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  padding: 8px 0;
  z-index: 10;
  margin-top: 10px;
  pointer-events: auto;
}

/* Create invisible bridge between button and dropdown */
.header-nav .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.header-nav .nav-dropdown:hover .dropdown-menu {
  display: block;
  pointer-events: auto;
}

.header-nav .dropdown-menu a {
  display: block;
  padding: 10px 16px;
  text-transform: none;
  font-weight: 400;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
  pointer-events: auto;
}

.header-nav .dropdown-menu a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Search Box */
.search-box {
  display: flex;
  background: #fff;
  border-radius: 25px;
  overflow: hidden;
  min-width: 400px;
  flex-shrink: 1;
}

.search-box input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  outline: none;
}

.search-box button {
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 0 20px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box button:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: scale(1.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Hide mobile toggles on desktop */
.mobile-menu-toggle,
.mobile-search-toggle,
.mobile-nav-overlay,
.mobile-nav-drawer {
  display: none;
}


/* Icon Buttons */
.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.icon-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login Button */
.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff !important;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 204, 255, 0.4);
}

.login-btn.logged-in {
  background: rgba(255, 255, 255, 0.1);
}

.login-btn.logged-in:hover {
  background: rgba(255, 255, 255, 0.2);
}

.login-btn i {
  font-size: 1.3rem;
}

/* User Account with Label */
.user-account-wrapper {
  display: flex;
  align-items: center;
}

.icon-btn-with-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.icon-btn-with-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn-with-label i {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.icon-btn-with-label:hover i {
  transform: scale(1.1);
}

.user-name {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header User Avatar */
.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.user-avatar-link:hover .header-user-avatar {
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.header-user-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.user-avatar-link:hover .header-user-fallback {
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.header-user-fallback span {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}


/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* Wishlist Badge */
.wishlist-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

.wishlist-icon:hover i {
  color: var(--accent);
}

.user-auth {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  line-height: 1.2;
}

.user-auth a {
  display: block;
  padding: 2px 4px;
  color: #fff;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
}

.user-auth a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Admin Return Button */
.admin-return-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: #28a745;
  color: white !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.admin-return-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.admin-return-btn i {
  font-size: 1.1rem;
}

.cart-link {
  position: relative;
  font-size: 1.5rem;
}

.cart-link .badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
}

/* Navigation Dropdown in Header */
.header-nav .nav-dropdown {
  position: relative;
}

.header-nav .nav-dropdown .dropdown-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  transition: color 0.3s;
  display: inline-block;
}

.header-nav .nav-dropdown .dropdown-toggle:hover {
  color: var(--primary);
}

.header-nav .nav-dropdown .arrow {
  font-size: 0.7em;
  margin-left: 4px;
}

.header-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  padding: 8px 0;
  z-index: 10;
  margin-top: 10px;
}

.header-nav .nav-dropdown:hover .dropdown-menu {
  display: block;
}

.header-nav .dropdown-menu a {
  display: block;
  padding: 10px 16px;
  text-transform: none;
  font-weight: 400;
  color: var(--text);
  transition: all 0.2s;
}

.header-nav .dropdown-menu a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.main-nav {
  justify-content: center;
  background: #edeff5;
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 14px 60px;
  color: #222;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.main-nav a {
  padding: 8px 0;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--primary);
}

.main-nav .sale-link {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown .dropdown-toggle {
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  padding: 8px 0;
  color: #222;
  transition: color 0.2s;
  display: inline-block;
}

.nav-dropdown .dropdown-toggle:hover {
  color: var(--primary);
}

.nav-dropdown .arrow {
  font-size: 0.7em;
  margin-left: 4px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 8px 0;
  z-index: 10;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  text-transform: none;
  font-weight: 400;
}

.dropdown-list a:hover {
  background: var(--gray-100);
  color: var(--primary);
}


.site-main {
  padding: 40px 60px 80px;
}

.hero-grid {
  width: 100%;
  margin: 0;
  padding: 0;
}

.hero-main {
  width: 100%;
}

.hero-main img {
  width: 100%;
  border-radius: 0;
  height: 100%;
  object-fit: cover;
}

.category-icons {
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  text-align: center;
}

.category-icons a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}

.category-icons a:hover {
  color: var(--primary);
}

.icon-circle {
  width: 140px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: all 0.3s ease;
}

.icon-circle:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
}

.product-section {
  margin: 20px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2,
.section-title {
  font-size: 2rem;
  margin: 0;
}

.section-heading p {
  margin: 4px 0 0;
  color: #6b7280;
}

.section-heading .btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.section-heading .btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 204, 255, 0.4);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.product-card h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--text);
}

.product-card .category {
  color: #6b7280;
  font-size: 0.92rem;
  margin: 6px 0;
}

.product-card .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.product-card .btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    border-radius: 20px;
}

.site-footer {
  background: var(--gray-900);
  color: #fff;
  padding: 40px 60px;
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  gap: 40px;
}

.site-footer img {
  width: 200px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-columns h4 {
  margin-bottom: 12px;
}

.footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #d1d5db;
}

.footer-columns a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-map {
  background: #000;
  border-radius: 16px;
  height: 250px;
  overflow: hidden;
}

.footer-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 1200px) {
  .top-bar,
  .main-nav,
  .site-main,
  .site-footer {
    padding: 20px 40px;
  }
}

@media (max-width: 992px) {
  .top-bar,
  .main-nav,
  .site-main,
  .site-footer {
    padding: 20px;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
    order: 3;
    margin-top: 10px;
  }

  .header-actions {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    margin-top: 10px;
  }

  .user-auth {
    flex-direction: row;
    gap: 12px;
  }

  .main-nav {
    gap: 20px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
  }

  .main-nav a,
  .nav-dropdown button {
    flex-shrink: 0;
  }

  .hero-grid {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile Responsive - Header & Footer */
@media (max-width: 768px) {
  /* Header Mobile */
  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .top-bar {
    flex-direction: row;
    align-items: center;
    padding: 12px 15px;
    gap: 12px;
  }

  .logo {
    flex: 0 0 auto;
    font-size: 1rem;
  }

  .logo img {
    width: 70px !important;
    height: 32px !important;
  }

  /* Hide desktop navigation */
  .header-nav {
    display: none;
  }

  /* Mobile Search */
  .search-box {
    display: none;
    min-width: unset;
    order: 4;
    margin-top: 12px;
    width: 100%;
  }

  .search-box.active {
    display: flex;
  }

  .search-box input {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .search-box button {
    padding: 0 15px;
    font-size: 1.2rem;
  }

  /* Mobile Header Actions */
  .header-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 0;
    width: auto;
    flex: 1;
    justify-content: flex-end;
  }

  .admin-return-btn {
    display: none;
  }

  .user-account-wrapper {
    order: -1;
  }

  .icon-btn-with-label {
    padding: 4px;
  }

  .icon-btn-with-label i {
    font-size: 1.5rem;
  }

  .user-name {
    display: none;
  }

  /* Hide user account wrapper (avatar/login icon) on mobile header */
  .user-account-wrapper {
    display: none !important;
  }

  .header-user-avatar,
  .header-user-fallback {
    width: 28px;
    height: 28px;
  }

  .header-user-fallback span {
    font-size: 0.8rem;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }

  .cart-badge,
  .wishlist-badge {
    top: -2px;
    right: -2px;
    font-size: 0.65rem;
    padding: 2px 5px;
    min-width: 16px;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    order: 5;
    border: none;
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .mobile-menu-toggle i {
    font-size: 1.5rem;
    color: #fff;
  }

  /* Mobile Search Toggle */
  .mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
  }

  .mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .mobile-search-toggle i {
    font-size: 1.5rem;
    color: #fff;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px;
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand img {
    width: 150px !important;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-columns h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-columns ul {
    gap: 8px;
    font-size: 0.9rem;
  }

  .footer-map {
    height: 200px;
    border-radius: 12px;
  }
}

@media (max-width: 576px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }

  /* Extra small mobile adjustments */
  .top-bar {
    padding: 10px 12px;
  }

  .logo img {
    width: 60px !important;
    height: 28px !important;
  }

  .header-actions {
    gap: 6px;
  }

  .icon-btn {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }

  .mobile-menu-toggle,
  .mobile-search-toggle {
    width: 35px;
    height: 35px;
  }

  .mobile-menu-toggle i,
  .mobile-search-toggle i {
    font-size: 1.3rem;
  }

  .site-footer {
    padding: 25px 12px;
  }

  .footer-brand img {
    width: 130px !important;
  }
  .footer-columns h4 {
    font-size: 1rem;
  }

  .footer-columns ul {
    font-size: 0.85rem;
  }
}

/* Mobile Navigation Drawer Styles */
@media (max-width: 992px) {
.mobile-nav-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -300px; /* Start off-screen */
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 1002;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.mobile-logo img {
  height: 30px;
  width: auto;
}

.close-nav-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #666;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.close-nav-btn:hover {
  color: #ff0000;
}

.mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
}

/* Mobile Search in Drawer */
.mobile-search-form {
  display: flex;
  margin: 0 20px 20px 20px;
  background: #f1f1f1;
  border-radius: 8px;
  padding: 5px;
  border: 1px solid #ddd;
}

.mobile-search-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}

.mobile-search-form button {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-search-form button i {
  font-size: 1.2rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.mobile-nav-link i {
  font-size: 1.25rem;
  color: #999;
  min-width: 24px;
  text-align: center;
  transition: color 0.2s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: #f0f7ff;
  color: var(--primary);
  border-left-color: var(--primary);
}

.mobile-nav-link:hover i {
  color: var(--primary);
}

.mobile-nav-link.primary-color {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-link.text-danger {
  color: #dc3545;
}

.mobile-nav-link.text-danger:hover {
  background: #fff5f5;
  border-left-color: #dc3545;
}

.mobile-nav-link.text-danger i {
  color: #dc3545;
}

.mobile-nav-group {
  margin-bottom: 5px;
}

.mobile-nav-link.has-submenu {
  cursor: pointer;
  justify-content: space-between;
}

.mobile-nav-link.has-submenu span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-nav-link .bx-chevron-down {
  transition: transform 0.3s ease;
}

.mobile-submenu {
  background: #f9f9f9;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.mobile-submenu.active {
  max-height: 500px; /* Adjust as needed */
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.mobile-submenu a {
  display: block;
  padding: 10px 24px 10px 60px; /* Indented */
  color: #555;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-submenu a:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.02);
}

.mobile-nav-divider {
  height: 1px;
  background: #eee;
  margin: 10px 24px;
}

/* Scroll Lock */
body.no-scroll {
  overflow: hidden;
}
}
/* ==================================== */
/* 1. TRANG TẤT CẢ SẢN PHẨM (product/index.php) */
/* ==================================== */

.product-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.product-page-title {
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    color: #216d3f; 
    margin-bottom: 40px;
    letter-spacing: 1.5px;
}

.product-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px;
    align-items: stretch; 
}

.product-item {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.2s;
    border-radius: 5px;
    height: 100%; 
}

.product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-item img {
    width: 100%;
    height: 250px; 
    object-fit: cover;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
    justify-content: space-between;
}

.product-name {
    font-size: 1em;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
    min-height: 2.8em; 
    max-height: 2.8em; 
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #d9534f;
    margin-top: auto; 
}

.product-gallery-preview {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
}

.product-gallery-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

/* Phân trang */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 8px;
    font-size: 1.1em;
    position: relative;
    z-index: 1;
}

.pagination * {
    position: relative;
    z-index: 1;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 15px;
    text-decoration: none;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.pagination-btn:hover {
    background-color: #f0f0f0;
    border-color: #216d3f;
}

.pagination a.pagination-btn {
    cursor: pointer;
    pointer-events: auto;
}

.pagination span.current.pagination-btn {
    background-color: #216d3f;
    color: white;
    border-color: #216d3f;
    font-weight: 600;
}

.pagination .disabled.pagination-btn {
    background-color: #f3f4f6;
    color: #bbb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 5px;
    color: #888;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Legacy support for old pagination styles */
.pagination a:not(.pagination-btn), .pagination span:not(.pagination-btn):not(.pagination-ellipsis) {
    min-width: 40px;
    height: 40px;
    padding: 8px 15px;
    text-decoration: none;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}

.pagination a:not(.pagination-btn):hover {
    background-color: #f0f0f0;
}

.pagination span.current:not(.pagination-btn) {
    background-color: #216d3f;
    color: white;
    border-color: #216d3f;
    font-weight: 600;
}

.pagination .disabled:not(.pagination-btn) {
    background-color: #f3f4f6;
    color: #bbb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================================== */
/* 2. TRANG CHI TIẾT SẢN PHẨM (product/detail.php) */
/* ==================================== */

.detail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.product-main-info {
    display: flex;
    gap: 40px;
}

.product-gallery {    width: 40%;
}

.main-image-wrapper {
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    background: #f9fafb;
}

.main-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.product-details {    width: 58%;
}

.product-details h2 {
    font-size: 2em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
}

.detail-price {
    font-size: 1.8em;
    font-weight: 700;
    color: #d9534f;
    margin-bottom: 20px;
}

.detail-option-group {
    margin-bottom: 15px;
}

.detail-option-group span {
    font-weight: 500;
    margin-right: 10px;
}

/* Nút tùy chọn (Màu sắc, Size) */
.option-btn {
    display: inline-block;
    padding: 5px 12px;
    margin: 5px 5px 5px 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.2s;
    font-size: 0.9em;
}

.option-btn:hover {
    border-color: #333;
}

.option-btn.selected {
    border-color: #00AEEF;
    background-color: #e6f9ff;
    font-weight: 600;
}

/* Số lượng */
.quantity-control {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.quantity-control button {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s;
}

.quantity-control button:hover {
    background-color: #e0e0e0;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    border: none;
    outline: none;
    padding: 8px 0;
}

.stock-status {
    color: #00AEEF;
    margin-left: 15px;
    font-weight: 500;
}

/* Nút Mua/Thêm giỏ hàng */
.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.buy-now-btn, .add-to-cart-btn {
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    text-align: center;
}

.buy-now-btn {
    background: linear-gradient(135deg, #00CCFF 0%, #00AEEF 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.3);
}

.buy-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.4);
    opacity: 1;
}

.add-to-cart-btn {
    background-color: white;
    color: #00AEEF;
    border: 1px solid #00AEEF;
}

.add-to-cart-btn:hover {
    background-color: #f0f0f0;
}

/* Mô tả và Chi tiết */
.detail-section-header {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #00AEEF;
    padding-bottom: 5px;
    color: #00AEEF;
}

.detail-section-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.product-meta strong {
    font-weight: 600;
    display: inline-block;
    width: 100px;
}

/* Đánh giá */
.review-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
}

/* Review Avatar */
.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    margin-right: 10px;
}

.review-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    margin-right: 10px;
}

.review-avatar-fallback span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.reviewer-name {
    font-weight: 600;
    margin-right: 10px;
}

.review-meta {
    color: #777;
}

.star-rating {
    color: gold;
    font-size: 1.1em;
    margin-top: 5px;
}

.review-content {
    margin-top: 10px;
    color: #555;
}

.review-actions button {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.9em;
}

/* ==================================== */
/* 3. CART PAGE */
/* ==================================== */

.cart-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.cart-items-wrapper {
    margin-top: 30px;
}

.cart-summary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.cart-summary-card h4 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    color: var(--gray-900);
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.summary-list li:last-of-type {
    border-bottom: none;
}

.summary-list li span {
    color: #6b7280;
    font-size: 0.95rem;
}

.summary-list li strong {
    color: var(--gray-900);
    font-size: 1rem;
    font-weight: 600;
}

.cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
    margin: 20px 0;
}

.cart-summary__total span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.cart-summary__total strong {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

.cart-summary__note {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    margin: 20px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.cart-summary .btn {
    margin-bottom: 12px;
}

.col-action {
    width: 80px;
    text-align: center;
}

.cart-remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.cart-remove-btn:hover {
    background: #fee2e2;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--gray-900);
    line-height: 1.4;
}

.product-details p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
  font-size: 0.95rem;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
}

.btn-link {
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-full {
  width: 100%;
}

.cart-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.cart-page__head {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.cart-page__path {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #6b7280;
}

.cart-page__head h1 {
  margin: 10px 0 8px;
  font-size: 2rem;
  color: var(--gray-900);
}

.cart-page__meta {
  color: #6b7280;
}

.cart-empty {
  padding: 60px 20px;
  border: 1px dashed #cbd5f5;
  border-radius: 24px;
  text-align: center;
  background: #f9fafb;
  display: grid;
  place-items: center;
  gap: 16px;
}

.cart-empty img {
  filter: grayscale(0.2);
}

.cart-table-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.cart-table-v2 {
  width: 100%;
  border-collapse: collapse;
}

.cart-table-v2 thead tr {
  background: #3b3b3b;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cart-table-v2 th,
.cart-table-v2 td {
  padding: 20px 16px;
  border-bottom: 1px solid #ededed;
  vertical-align: middle;
}

.cart-table-v2 tbody tr:last-child td {
  border-bottom: none;
}

.col-select {
  width: 60px;
  text-align: center;
}

.col-product {
  width: 45%;
}

.col-price,
.col-qty,
.col-total {
  text-align: center;
  font-weight: 600;
  color: #111827;
}

.cart-product-cell {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}

.cart-product-cell img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.cart-product-cell h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--gray-900);
}

.cart-product-cell p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.dot-separator {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d1d5db;
  margin: 0 8px;
}

.cart-remove-btn {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s;
}

.cart-remove-btn:hover {
  color: var(--accent);
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

.quantity-stepper button {
  border: none;
  background: #f9fafb;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}

.quantity-stepper button:hover {
  background: #e5e7eb;
}

.quantity-stepper input {
  width: 48px;
  border: none;
  text-align: center;
  font-weight: 600;
  background: transparent;
}

.cart-bottom-bar {
  margin-top: 16px;
  padding: 18px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #fff;
}

.cart-bottom-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-bottom-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-footer-actions {

  margin-top: 30px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.cart-footer-total {
  display: flex;
  flex-direction: column;
  text-align: right;
  margin-left: auto;
}

.cart-footer-total span {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.cart-footer-total strong {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

.checkbox input {
  display: none;
}

.checkbox span {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  display: inline-block;
  position: relative;
}

.checkbox input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox input:checked + span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox input:indeterminate + span {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox input:indeterminate + span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 2px;
  background: #fff;
  border: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 992px) {
  .cart-table-v2 th,
  .cart-table-v2 td {
    padding: 16px 10px;
  }

  .cart-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-bottom-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .cart-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cart-footer-total {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .cart-page {
    padding: 0 10px 60px;
  }

  .cart-table-v2,
  .cart-table-v2 thead {
    display: block;
  }

  .cart-table-v2 thead {
    display: none;
  }

  .cart-table-v2 tbody tr {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #ededed;
  }

  .col-select,
  .col-product,
  .col-price,
  .col-qty,
  .col-total {
    width: 100%;
    text-align: left;
  }
}


/* Out of Stock Overlay */
.product-card.out-of-stock {
    position: relative;
    opacity: 0.6;
}

.product-card.out-of-stock::before {
    content: 'H?T H�NG';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    z-index: 10;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.product-card.out-of-stock .add-to-cart-btn,
.product-card.out-of-stock .buy-now-btn {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   RESPONSIVE FOR PAGES (Product List & Detail)
   ========================================= */

@media (max-width: 992px) {
    .product-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Product Grid */
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-page-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    /* Product Detail */
    .product-main-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .product-gallery, 
    .product-details {
        width: 100%;
    }
    
    .detail-container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .detail-price {
        font-size: 1.5em;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .buy-now-btn, .add-to-cart-btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    .detail-section-header {
        font-size: 1.2em;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .product-grid-container {
        grid-template-columns: repeat(1, 1fr);
    }
}
