/* ===== GLOBAL STYLES ===== */
:root {
  --primary-color: #d4a373;
  --primary-hover: #bc8f63;
  --secondary-color: #d4a373;
  --dark-bg: #333333;
  --light-bg: #fcfcfc;
  --surface: #ffffff;
  --text-dark: #333333;
  --text-light: #666666;
  --muted: #8a8a8a;
  --border-color: #eaeaea;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #d34d57;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background-color: var(--light-bg);
  line-height: 1.75;
}

body.menu-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6,
.logo-text,
.btn {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.02em;
}

.logo-text {
  font-size: 1.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  border: none;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 8px 20px rgba(212, 163, 115, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212, 163, 115, 0.32);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.1rem 1.75rem 0;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-light);
  font-size: 0.92rem;
}

.breadcrumb-item::after {
  content: '/';
  color: #c7b09a;
  margin-left: 0.25rem;
}

.breadcrumb-item:last-child::after {
  display: none;
}

.breadcrumb-item a {
  color: var(--primary-color);
  font-weight: 600;
  transition: color 0.25s ease, transform 0.25s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-hover);
  transform: translateX(1px);
}

.breadcrumb-item.active span {
  color: var(--text-dark);
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
/* Tablet (1024px and below) */
@media (max-width: 1024px) {
  /* Navbar */
    .product-actions {
      flex-direction: column;
      gap: 0.5rem;
      margin-top: 0.6rem;
    }

    .btn-add-cart,
    .btn-buy-now,
    .product-overlay .btn-sm {
      white-space: normal;
      font-size: 0.88rem; /* slightly smaller on very small devices */
      padding: 0.7rem 0.7rem; /* reduced padding for compactness */
      border-radius: 8px;
      width: 100%;
      box-sizing: border-box;
    }

    .product-overlay .btn-sm {
      padding: 0.5rem 0.8rem;
      font-size: 0.88rem;
    }
  .navbar-container {
    padding: 0.75rem 1.5rem;
    gap: 0.8rem;
  }

  .announcement-bar {
    padding: 0.6rem 1.5rem;
  }

  .navbar-menu {
    display: none;
  }

  .navbar-search-wrapper {
    display: none;
  }

  .navbar-right {
    gap: 1rem;
  }

  .auth-link span,
  .icon-label {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Page Content */
  .slide {
    flex-direction: column;
    gap: 2rem;
  }

  .slide-content h1 {
    font-size: 2rem;
  }

  .product-detail-container {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .product-features {
    grid-template-columns: 1fr;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  .announcement-bar {
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
  }

  .announcement-content {
    flex-direction: column;
    gap: 0.4rem;
  }

  .announcement-content i {
    display: none;
  }

  .navbar-container {
    padding: 0.65rem 1rem;
    gap: 0.8rem;
  }

  .logo-text {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .nav-auth {
    display: none;
  }

  .navbar-icons {
    gap: 0.5rem;
  }

  .icon-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .mobile-menu {
    width: 100%;
  }

  .mobile-menu-content {
    padding: 1rem;
    padding-top: 80px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .announcement-bar {
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
  }

  .navbar-container {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .navbar-icons {
    gap: 0.3rem;
  }

  .icon-link {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .mobile-menu-toggle {
    font-size: 1.3rem;
    padding: 0.3rem;
  }

  .mobile-menu {
    padding-top: 50px;
  }

  .mobile-menu-content {
    padding: 0.75rem;
    padding-top: 70px;
  }

  .mobile-nav-link {
    padding: 0.85rem 0.8rem;
    font-size: 0.9rem;
  }

  .mobile-dropdown-item {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }

  .mobile-account-btn {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  /* Page Content */
  .slide-content h1 {
    font-size: 1.5rem;
  }

  .slide-content p {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-price-detail {
    flex-wrap: wrap;
  }

  .tabs-header {
    overflow-x: auto;
  }

  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* ===== LOADING & TRANSITIONS ===== */
.btn:disabled,
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== FORM STATES ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
  border: 1.5px solid rgba(202, 138, 127, 0.2);
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(202, 138, 127, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: rgba(143, 123, 121, 0.6);
}

input:invalid {
  border-color: var(--danger);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: rgba(240, 240, 240, 0.5);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Product card styles moved to public/css/shop.css for a single canonical source */

/* ===== QUANTITY INPUT STYLING ===== */
input[type="number"] {
  width: 100px;
  padding: 0.7rem 0.8rem;
  text-align: center;
  border: 1.5px solid rgba(202, 138, 127, 0.2);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ===== RANGE INPUT STYLING ===== */
input[type="range"] {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.3);
}

/* ===== CHECKBOX & RADIO STYLING ===== */
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
  margin-right: 0.5rem;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== SELECT DROPDOWN STYLING ===== */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* ===== ANIMATION UTILITIES ===== */
.fade-in {
  animation: fadeIn 0.5s ease;
}

.slide-in {
  animation: slideIn 0.3s ease;
}

.pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== FOCUS VISIBLE (Keyboard Navigation) ===== */
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== LINK HOVER EFFECTS ===== */
a:not(.btn):hover {
  opacity: 0.8;
}

/* ===== TABLE STYLING (for order history) ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--light-bg);
  font-weight: 600;
}

tbody tr:hover {
  background: var(--light-bg);
}

/* ===== BADGE STYLING ===== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-info {
  background: #3b82f6;
  color: white;
}

/* ===== ALERT/MESSAGE STYLING ===== */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

/* Product action/button rules moved to public/css/shop.css for consistency */

/* ===== SEARCH RESULTS PAGE ===== */
.shop-section {
  padding: 3rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #ffffff;
}

.shop-page-header {
  text-align: center;
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shop-page-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.shop-page-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.shop-page-header p strong {
  color: var(--primary-color);
}

.shop-page-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  margin-top: 1rem;
  border-radius: 6px;
}

.shop-products {
  width: 100%;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.product-count {
  color: var(--text-light);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .shop-section {
    padding: 2rem 1rem;
  }
  .shop-page-header h1 {
    font-size: 2rem;
  }
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

@media (max-width: 480px) {
  .shop-page-header h1 {
    font-size: 1.75rem;
  }
}

.search-results-page .products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1200px) {
  .search-results-page .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .search-results-page .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

