/* public/css/style.css */

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

:root {
  /* Core Color Palette */
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-color: #6c757d;
  --secondary-hover: #5a6268;
  --success-color: #28a745;
  --success-hover: #218838;
  --danger-color: #dc3545;
  --danger-hover: #c82333;
  --warning-color: #ffc107;
  --warning-hover: #e0a800;
  --info-color: #17a2b8;
  --info-hover: #138496;
  --light-color: #f8f9fa;
  --dark-color: #343a40;

  /* Text & Links */
  --text-color: #333;
  --link-color: var(--primary-color);

  /* Layout & Components */
  --card-bg: #ffffff;
  --card-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  --border-color: #dee2e6;
  --border-radius: 0.6rem; /* Smoother corners */
  --spacing-unit: 1rem;

  /* Gradient Background Colors */
  --gradient-start: #e9f1ff;
  --gradient-mid1: #d0e0ff;
  --gradient-mid2: #e0ebf7;
  --gradient-end: #f0f5fd;
}

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

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg,
      var(--gradient-start) 0%,
      var(--gradient-mid1) 25%,
      var(--gradient-mid2) 55%,
      var(--gradient-end) 100%
    );
  background-attachment: fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

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

h1, h2, h3, h4, h5, h6 {
  margin-bottom: calc(var(--spacing-unit) * 0.75);
  line-height: 1.3;
  font-weight: 500;
}

p {
  margin-bottom: var(--spacing-unit);
}

ul, ol {
    margin-bottom: var(--spacing-unit);
    padding-left: calc(var(--spacing-unit) * 1.5);
}

/* Utility Classes */
.hidden { display: none !important; }
.hide { display: none !important; } /* Alias */
.text-center { text-align: center; }
.text-danger { color: var(--danger-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--secondary-color) !important; }
.mb-1 { margin-bottom: calc(var(--spacing-unit) * 0.25) !important; }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 0.5) !important; }
.mb-3 { margin-bottom: var(--spacing-unit) !important; }
.mb-4 { margin-bottom: calc(var(--spacing-unit) * 1.5) !important; }
.mt-1 { margin-top: calc(var(--spacing-unit) * 0.25) !important; }
.mt-2 { margin-top: calc(var(--spacing-unit) * 0.5) !important; }
.mt-3 { margin-top: var(--spacing-unit) !important; }
.mt-4 { margin-top: calc(var(--spacing-unit) * 1.5) !important; }
.ms-1 { margin-left: calc(var(--spacing-unit) * 0.25) !important; } /* Margin start */
.ms-2 { margin-left: calc(var(--spacing-unit) * 0.5) !important; }
.me-1 { margin-right: calc(var(--spacing-unit) * 0.25) !important; }
.me-2 { margin-right: calc(var(--spacing-unit) * 0.5) !important; } /* Margin end */
.me-3 { margin-right: var(--spacing-unit) !important; }
.p-1 { padding: calc(var(--spacing-unit) * 0.25) !important; }
.p-2 { padding: calc(var(--spacing-unit) * 0.5) !important; }
.p-3 { padding: var(--spacing-unit) !important; }
.pt-1 { padding-top: calc(var(--spacing-unit) * 0.25) !important; }
.pt-2 { padding-top: calc(var(--spacing-unit) * 0.5) !important; }
.pt-3 { padding-top: var(--spacing-unit) !important; }
.pb-1 { padding-bottom: calc(var(--spacing-unit) * 0.25) !important; }
.pb-2 { padding-bottom: calc(var(--spacing-unit) * 0.5) !important; }
.pb-3 { padding-bottom: var(--spacing-unit) !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.gap-1 { gap: calc(var(--spacing-unit) * 0.25) !important; }
.gap-2 { gap: calc(var(--spacing-unit) * 0.5) !important; }
.gap-3 { gap: var(--spacing-unit) !important; }
.small { font-size: 0.875em; }
.fs-5 { font-size: 1.25rem !important; }
.w-100 { width: 100% !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.fw-bold { font-weight: bold !important; }
.fw-normal { font-weight: normal !important; }
.fw-light { font-weight: lighter !important; }
.text-capitalize { text-transform: capitalize !important; }
.border { border: 1px solid var(--border-color) !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.rounded { border-radius: var(--border-radius) !important; }


/* Forms */
.inline-form {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
}
.inline-form > * {
    margin-bottom: 0;
    vertical-align: middle;
}
.inline-form + .inline-form {
    margin-left: calc(var(--spacing-unit) * 0.3);
}


.form-group {
  margin-bottom: calc(var(--spacing-unit) * 0.8);
}

label:not(.form-label-inline) {
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 0.3);
  font-weight: 500;
}
label.form-label-inline {
    margin-bottom: 0;
    margin-right: calc(var(--spacing-unit) * 0.4);
    font-weight: normal;
}

/* --- ADDED: Position relative for password wrapper --- */
.password-wrapper {
    position: relative;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  line-height: 1.5;
  background-color: #fff;
  color: var(--text-color);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* --- ADDED: Padding-right for password input when toggle is present --- */
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    /* Adjust padding-right to make space for the icon */
    padding-right: calc(var(--spacing-unit) * 2.5) !important;
}


.form-control {
    display: block;
    width: 100%;
    padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 0.75);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    appearance: none;
    border-radius: var(--border-radius);
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

/* Helper text style */
.form-text {
    display: block;
    margin-top: .25rem;
    font-size: .8em; /* Smaller font size */
    color: var(--secondary-color); /* Muted color */
}


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

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-sm {
  min-height: calc(1.5em + 0.5rem + 2px);
  height: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: calc(var(--border-radius) * 0.75);
}
select.form-control-sm {
  height: calc(1.8125rem + 2px);
}

/* --- ADDED: Password Toggle Icon Button --- */
.password-toggle-btn {
    position: absolute;
    right: 10px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--secondary-color); /* Icon color */
    font-size: 1rem; /* Adjust icon size */
    line-height: 1;
    z-index: 10; /* Ensure it's clickable */
}
.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: var(--primary-color);
    outline: none;
}
.password-toggle-btn i {
    display: block; /* Helps with vertical alignment if needed */
    width: 1em; /* Ensure consistent width for icon change */
    text-align: center;
}


/* Buttons */
.btn {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: calc(var(--spacing-unit) * 0.5) var(--spacing-unit);
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, opacity 0.15s ease-in-out; /* Added opacity transition */
  text-transform: capitalize;
}

.btn:hover {
  color: #fff;
  text-decoration: none;
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.loading {
    opacity: 0.75;
    cursor: wait;
    pointer-events: none;
}

/* --- ADDED: AJAX Add to Cart Button States --- */
.btn-ajax-add-to-cart.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}
.btn-ajax-add-to-cart.success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
    pointer-events: none; /* Optionally disable clicks while showing success */
}


.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff;}
.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background-color: var(--secondary-color); border-color: var(--secondary-color); color: #fff; }
.btn-secondary:hover { background-color: var(--secondary-hover); border-color: var(--secondary-hover); }
.btn-success { background-color: var(--success-color); border-color: var(--success-color); color: #fff;}
.btn-success:hover { background-color: var(--success-hover); border-color: var(--success-hover); }
.btn-danger { background-color: var(--danger-color); border-color: var(--danger-color); color: #fff;}
.btn-danger:hover { background-color: var(--danger-hover); border-color: var(--danger-hover); }
.btn-warning { background-color: var(--warning-color); border-color: var(--warning-color); color: #212529;}
.btn-warning:hover { background-color: var(--warning-hover); border-color: var(--warning-hover); }
.btn-info { background-color: var(--info-color); border-color: var(--info-color); color: #fff;}
.btn-info:hover { background-color: var(--info-hover); border-color: var(--info-hover); }
.btn-light { background-color: var(--light-color); border-color: var(--light-color); color: #212529;}
.btn-light:hover { background-color: #e2e6ea; border-color: #dae0e5; }
.btn-dark { background-color: var(--dark-color); border-color: var(--dark-color); color: #fff;}
.btn-dark:hover { background-color: #23272b; border-color: #1d2124; }

.btn-outline-secondary { color: var(--secondary-color); border-color: var(--secondary-color); background-color: transparent;}
.btn-outline-secondary:hover { color: #fff; background-color: var(--secondary-color); }
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); background-color: transparent;}
.btn-outline-primary:hover { color: #fff; background-color: var(--primary-color); }

.btn-text {
    background-color: transparent;
    border-color: transparent;
    color: var(--link-color);
    padding: calc(var(--spacing-unit) * 0.25) calc(var(--spacing-unit) * 0.4);
    border-radius: var(--border-radius);
    vertical-align: middle;
}
.btn-text:hover,
.btn-text:focus {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-hover);
    text-decoration: none;
    outline: none;
    box-shadow: none;
}
.btn-text.btn-danger { color: var(--danger-color); }
.btn-text.btn-danger:hover,
.btn-text.btn-danger:focus { color: var(--danger-hover); background-color: rgba(220, 53, 69, 0.1); }

.btn-sm {
  padding: calc(var(--spacing-unit) * 0.25) calc(var(--spacing-unit) * 0.5);
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: calc(var(--border-radius) * 0.8);
}
.btn-lg {
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.25);
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn .fa-spinner {
    margin-right: calc(var(--spacing-unit) * 0.25);
    animation: fa-spin 1s infinite linear;
}
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add this at the end of the Buttons section */
.btn-google {
    background-color: #ffffff;
    color: #444;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn-google:hover,
.btn-google:focus {
    background-color: #f7f7f7;
    border-color: #ccc;
    color: #222;
}
.btn-google .fa-google {
    color: #db4437; /* Google's red color */
    margin-right: 10px;
}


/* Alerts */
.alert {
  padding: calc(var(--spacing-unit) * 0.8) var(--spacing-unit);
  margin-bottom: var(--spacing-unit);
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  position: relative;
}
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }
.alert-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }
.alert-link { font-weight: bold; color: inherit; text-decoration: underline; }

.close-alert {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 1.2rem;
  line-height: 1;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.close-alert:hover { opacity: 1; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1055;
  width: auto;
  max-width: 350px;
  pointer-events: none;
}

.toast {
  background-color: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  margin-bottom: var(--spacing-unit);
  padding: calc(var(--spacing-unit) * 0.75);
  padding-right: calc(var(--spacing-unit) * 2.5);
  position: relative;
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  width: 100%;
  pointer-events: auto;
  min-height: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transition: opacity 0.3s ease-in, transform 0.3s ease-in;
}

.toast-body {
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.toast-close-btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: bold;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
}
.toast-close-btn:hover {
  opacity: 1;
  text-decoration: none;
}

.toast-success { background-color: #d4edda; color: #155724; border-left: 5px solid var(--success-color); }
.toast-success .toast-close-btn { color: #155724; }
.toast-danger { background-color: #f8d7da; color: #721c24; border-left: 5px solid var(--danger-color); }
.toast-danger .toast-close-btn { color: #721c24; }
.toast-warning { background-color: #fff3cd; color: #856404; border-left: 5px solid var(--warning-color); }
.toast-warning .toast-close-btn { color: #856404; }
.toast-info { background-color: #d1ecf1; color: #0c5460; border-left: 5px solid var(--info-color); }
.toast-info .toast-close-btn { color: #0c5460; }


/* ============================ */
/* Header Styles                */
/* ============================ */

.app-header {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: calc(var(--spacing-unit) * 0.4) var(--spacing-unit);
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: calc(var(--spacing-unit) * 0.5);
  min-height: 40px;
}

/* Left Side (Logo) */
.nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
}

.app-logo {
  display: flex;
  align-items: center;
  color: var(--light-color);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  margin-right: calc(var(--spacing-unit) * 0.5);
}
.app-logo:hover,
.app-logo:focus {
  color: var(--warning-color);
  text-decoration: none;
}
.app-logo i {
  margin-right: calc(var(--spacing-unit) * 0.3);
  font-size: 1.2em;
}

/* Center Section (Search Container) */
.search-container-dynamic {
  flex-grow: 0;
  max-width: none;
  order: 1;
  margin: 0;
  position: static;
}

/* --- Search Bar Black & White Styling (Shared) --- */
.search-form-dynamic {
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  color: var(--dark-color);
}
#search-input-dynamic {
  flex-grow: 1;
  padding: 0 calc(var(--spacing-unit) * 0.75);
  border: none;
  background-color: transparent;
  color: var(--dark-color);
  font-size: 0.9rem;
  height: 100%;
  outline: none;
}
#search-input-dynamic::placeholder {
  color: #6c757d;
  opacity: 1;
}
.search-submit-btn-dynamic {
  background: transparent;
  border: none;
  color: var(--dark-color);
  padding: 0 calc(var(--spacing-unit) * 0.75);
  cursor: pointer;
  font-size: 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease-in-out;
}
.search-submit-btn-dynamic:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
/* --- End Shared Search Bar Styling --- */

/* Suggestions Dropdown (Shared) */
.suggestions-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1010;
}
.suggestions-dropdown.active { display: block; }
.suggestion-item {
    display: flex;
    align-items: center;
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 0.75);
    cursor: pointer;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    gap: calc(var(--spacing-unit) * 0.5);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item:focus {
    background-color: var(--light-color);
    text-decoration: none;
    color: var(--text-color);
}
.suggestion-item img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) * 0.75);
    flex-shrink: 0;
}
.suggestion-item span {
    font-size: 0.9rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.suggestion-item i {
    font-style: normal;
    color: var(--secondary-color);
}


/* Right Side (Nav Links, Profile, Login) */
.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: calc(var(--spacing-unit) * 0.4);
}

/* General Nav Link Styling (Mobile Base) */
.nav-link {
  color: var(--light-color);
  padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 0.6);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  line-height: 1.2;
}
.nav-link span { display: none; }
.nav-link i { font-size: 1.2rem; margin-bottom: 2px; }

.nav-link:hover,
.nav-link.active,
.nav-link:focus {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  outline: none;
}

/* Cart Badge */
.nav-link-cart { position: relative; }
.cart-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  padding: 1px 5px;
  font-size: 0.7rem;
  font-weight: bold;
  line-height: 1;
  pointer-events: none;
}
.cart-badge.hide { display: none; }

/* Login/Register Button */
.btn-login-register {
    font-size: 0.85rem;
    padding: calc(var(--spacing-unit) * 0.4) calc(var(--spacing-unit) * 0.8);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    font-weight: 500;
}
.btn-login-register:hover,
.btn-login-register:focus {
    background-color: #fff;
    color: var(--primary-hover);
}
.btn-login-register i {
    margin-right: calc(var(--spacing-unit) * 0.3);
}


/* Profile Avatar */
.profile-avatar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--light-color);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
    margin-left: calc(var(--spacing-unit) * 0.2);
}
.profile-avatar-link:hover,
.profile-avatar-link:focus,
.profile-avatar-link.active {
    text-decoration: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    outline: none;
}
.profile-avatar-initials { line-height: 1; }

/* Mobile Search Toggle Button */
.search-toggle-btn {
    display: flex;
    order: 0;
}

/* Container and Footer */
.container {
  width: 100%;
  padding: var(--spacing-unit);
  margin: 0 auto;
  flex-grow: 1;
}

.app-footer {
  display: none;
  padding: var(--spacing-unit);
  text-align: center;
  font-size: 0.85rem;
  color: var(--secondary-color);
  background-color: rgba(248, 249, 250, 0.9);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}


/* Product Index */
.product-index-container h1 { font-size: 1.5rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--spacing-unit) * 0.75);
}

.product-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-link {
  color: inherit;
  text-decoration: none;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.product-link:hover{
  color: inherit;
  text-decoration: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-info {
  padding: calc(var(--spacing-unit) * 0.6);
  flex-grow: 1;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: calc(var(--spacing-unit) * 0.25);
  line-height: 1.3;
  height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  font-weight: 500;
  color: var(--success-color);
  margin-bottom: calc(var(--spacing-unit) * 0.2);
  font-size: 1rem;
}

.product-stock,
.product-rating {
  font-size: 0.8rem;
  color: var(--secondary-color);
  margin-bottom: calc(var(--spacing-unit) * 0.2);
}
.product-rating .fa-star, .product-rating .fa-star-half-alt { color: #f8d347; }
.product-rating .fa-star-regular { color: #e4e5e9; }

/* --- UPDATED: Add to Cart Form (AJAX) Container --- */
.product-card-actions {
    padding: 0 calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 0.6);
}
/* --- UPDATED: Styling for AJAX Add Button --- */
.btn-ajax-add-to-cart {
  width: 100%;
  padding: calc(var(--spacing-unit) * 0.5);
  font-size: 0.9rem;
}
.btn-ajax-add-to-cart i {
    margin-right: calc(var(--spacing-unit) * 0.25);
    /* Ensure spinner aligns well */
    vertical-align: middle;
}


/* Product Detail */
.product-detail-container {
  background-color: var(--card-bg);
  padding: var(--spacing-unit);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}
.product-detail-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
}
.product-detail-image { /* This styles the actual img tag */
    display: block; /* Remove extra space below image */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, might crop */
    /* object-fit: contain; */ /* Uncomment if you prefer to see the whole image */
    object-position: center center; /* Center the image */
    border-radius: inherit; /* Inherit border-radius from container */
}
.product-detail-info h1 {
    font-size: 1.6rem;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}
.detail-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: calc(var(--spacing-unit) * 0.3);
}
.detail-stock {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: calc(var(--spacing-unit) * 0.3);
}
.detail-rating {
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    color: var(--secondary-color);
}
.detail-rating i { color: #f8d347; }
.detail-rating .fa-star-regular { color: #e4e5e9; }

.product-actions {
    margin: calc(var(--spacing-unit) * 1.2) 0;
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 0.5);
}
.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    max-width: 150px;
}
.quantity-selector label {
    margin: 0 calc(var(--spacing-unit) * 0.4) 0 0;
    font-size: 0.9rem;
}
.quantity-selector input {
    text-align: center;
    font-size: 1rem;
    padding: calc(var(--spacing-unit) * 0.4);
}
.product-actions .btn {
    width: 100%;
    padding: calc(var(--spacing-unit) * 0.6) var(--spacing-unit);
    font-size: 1rem;
}

.share-section { margin: calc(var(--spacing-unit) * 1.2) 0; }
.fallback-share-links { margin-top: 0.5rem; }
.fallback-share-links a { margin: 0 0.3rem; font-size: 1.5rem; }

.product-specifications { margin-top: calc(var(--spacing-unit) * 1.5); }
.product-specifications h3 { font-size: 1.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3rem; margin-bottom: 0.5rem;}
.product-specifications pre {
    white-space: pre-wrap;
    font-size: 0.9rem;
    background-color: #f8f8f8;
    padding: calc(var(--spacing-unit) * 0.5);
    border-radius: var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
}

/* Rating Section */
.product-rating-section {
    margin-top: var(--spacing-unit);
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-unit);
}
.product-rating-section h3 {
    margin-bottom: calc(var(--spacing-unit) * 0.6);
    font-size: 1.2em;
}

.rating-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; margin-bottom: calc(var(--spacing-unit) * 0.8); }
.rating-stars input[type="radio"] { display: none; }
.rating-stars label { display: inline-block; cursor: pointer; font-size: 1.8rem; color: lightgray; padding: 0 0.1em; margin: 0; transition: color 0.2s ease-in-out; }
.rating-stars label:hover, .rating-stars label:hover ~ label { color: #f8d347; }
.rating-stars input[type="radio"]:checked ~ label { color: #f8d347; }

.rating-stats-container { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.rating-stats-container h3 { margin-bottom: 15px; font-size: 1.4em; color: #333; }
.rating-summary { display: flex; align-items: center; margin-bottom: 20px; gap: 15px; }
.rating-average { display: flex; align-items: center; }
.rating-average-value { font-size: 2.5em; font-weight: 500; margin-right: 5px; color: #222; }
.rating-average .fa-star { font-size: 1.2em; color: #666; margin-bottom: 8px; }
.rating-total { font-size: 0.95em; color: #555; }
.rating-bars { max-width: 400px; margin: 0 auto; }
.rating-bar-row { display: flex; align-items: center; margin-bottom: 8px; gap: 10px; }
.rating-bar-label { width: 45px; font-size: 0.9em; color: #444; text-align: right; flex-shrink: 0; }
.rating-bar-label .fa-star { color: #f8c107; font-size: 0.9em; }
.rating-bar-progress { flex-grow: 1; height: 8px; background-color: #e0e0e0; border-radius: 4px; overflow: hidden; }
.progress { background-color: #e9ecef; border-radius: 4px; display: flex; height: 1rem; overflow: hidden; font-size: .75rem;}
.progress-bar { background-color: var(--primary-color); color: #fff; display: flex; flex-direction: column; justify-content: center; overflow: hidden; text-align: center; white-space: nowrap; transition: width .6s ease;}
.rating-bar-fill { height: 100%; background-color: #28a745; border-radius: 4px; transition: width 0.3s ease-in-out; }
.rating-bar-row:nth-child(1) .rating-bar-fill { background-color: #28a745; } /* 5 stars */
.rating-bar-row:nth-child(2) .rating-bar-fill { background-color: #84c54c; } /* 4 stars */
.rating-bar-row:nth-child(3) .rating-bar-fill { background-color: #ffc107; } /* 3 stars */
.rating-bar-row:nth-child(4) .rating-bar-fill { background-color: #fd7e14; } /* 2 stars */
.rating-bar-row:nth-child(5) .rating-bar-fill { background-color: #dc3545; } /* 1 star */
.rating-bar-count { width: 40px; font-size: 0.9em; color: #555; text-align: right; flex-shrink: 0; }


/* Auth */
.auth-container {
  max-width: 450px;
  margin: var(--spacing-unit) auto;
  padding: var(--spacing-unit);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}
.auth-container h1 { font-size: 1.6rem; text-align: center; margin-bottom: var(--spacing-unit); }
.auth-form .btn { width: 100%; margin-top: calc(var(--spacing-unit) * 0.5); padding: calc(var(--spacing-unit) * 0.7); }
.auth-links { margin-top: var(--spacing-unit); font-size: 0.9rem; text-align: center; }
.auth-links p { margin-bottom: calc(var(--spacing-unit) * 0.4); }
.auth-container p { text-align: center; margin-bottom: var(--spacing-unit);}
.auth-container form ~ .auth-links { border-top: 1px solid var(--border-color); padding-top: var(--spacing-unit); }
#otp { text-align: center; font-size: 1.2rem; letter-spacing: 4px; }

/* Add this in the Auth section or a new dedicated area */
.auth-divider {
    text-align: center;
    margin: 1.2rem 0;
    overflow: hidden;
    line-height: 1.2em;
}
.auth-divider span {
    display: inline-block;
    position: relative;
    padding: 0 10px;
    background-color: var(--card-bg);
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    position: relative;
    top: 50%;
    width: 50%;
    display: inline-block;
    border-top: 1px solid var(--border-color);
}
.auth-divider::before {
    margin-left: -50%;
    right: 10px;
}
.auth-divider::after {
    margin-right: -50%;
    left: 10px;
}


/* Cart */
.cart-container h1 { font-size: 1.5rem; margin-bottom: var(--spacing-unit); }
.cart-items { margin-bottom: var(--spacing-unit); }

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  grid-template-areas:
    "image details remove"
    "image quantity subtotal";
  gap: calc(var(--spacing-unit) * 0.75);
  background-color: var(--card-bg);
  padding: calc(var(--spacing-unit) * 0.75);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-unit);
  box-shadow: var(--card-shadow);
}

.cart-item-image { grid-area: image; align-self: center;}
.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) * 0.75);
}
.cart-item-details { grid-area: details; }
.cart-item-quantity { grid-area: quantity; display: flex; align-items: center; gap: 0.3rem; }
.cart-item-subtotal { grid-area: subtotal; text-align: right; font-weight: 500; align-self: center; }
.cart-item-remove { grid-area: remove; text-align: right; align-self: start;}
.cart-item-name { font-size: 1rem; font-weight: 500; margin-bottom: calc(var(--spacing-unit) * 0.2); }
.cart-item-price { font-size: 0.9rem; color: var(--secondary-color); margin-bottom: calc(var(--spacing-unit) * 0.2); }
.cart-item-stock { font-size: 0.8rem; color: #6c757d; }
.cart-item-quantity label { font-size: 0.9rem; margin-bottom: 0; display: none; }
.cart-item-quantity input { width: 50px; padding: calc(var(--spacing-unit) * 0.3) calc(var(--spacing-unit) * 0.4); text-align: center; font-size: 0.9rem; }
.cart-item-quantity .btn-update-qty { font-size: 0.8rem; padding: calc(var(--spacing-unit) * 0.3) calc(var(--spacing-unit) * 0.6); }
.cart-item-subtotal { font-size: 0.9rem; white-space: nowrap; }
.cart-item-subtotal .item-subtotal-value { font-weight: 500; }
.cart-item-remove .btn { padding: 0.2rem 0.4rem; font-size: 0.8rem; ; }

.cart-summary {
  margin-top: calc(var(--spacing-unit) * 1.5);
  padding: var(--spacing-unit);
  background-color: #f8f9fa;
  border-top: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  text-align: right;
}
.cart-summary h2 { font-size: 1.3rem; margin-bottom: calc(var(--spacing-unit) * 0.75); }
.btn-checkout { width: 100%; padding: calc(var(--spacing-unit) * 0.7); font-size: 1.1rem; }


/* Checkout */
.checkout-container h1 { font-size: 1.5rem; margin-bottom: var(--spacing-unit);}
.checkout-grid { display: flex; flex-direction: column; gap: var(--spacing-unit); }

.checkout-address, .checkout-summary {
    background-color: var(--card-bg);
    padding: var(--spacing-unit);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}
.checkout-address h2, .checkout-summary h2 { font-size: 1.2rem; border-bottom: 1px solid var(--border-color); padding-bottom: calc(var(--spacing-unit) * 0.4); margin-bottom: var(--spacing-unit); }
.saved-address { font-size: 0.95rem; margin-bottom: var(--spacing-unit); }
.saved-address p { margin-bottom: calc(var(--spacing-unit) * 0.2); line-height: 1.4; }
#edit-address-btn { margin-top: calc(var(--spacing-unit) * 0.5); }
.address-form h3 { font-size: 1.1rem; }

.checkout-items { max-height: 200px; overflow-y: auto; margin-bottom: var(--spacing-unit); padding-right: calc(var(--spacing-unit) * 0.5); }
.checkout-item { display: flex; align-items: center; gap: calc(var(--spacing-unit) * 0.5); margin-bottom: calc(var(--spacing-unit) * 0.5); font-size: 0.9rem; }
.checkout-item-image img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) * 0.75);
}
.checkout-item-info { flex-grow: 1; }
.checkout-item-price { font-weight: 500; white-space: nowrap;}

.checkout-totals { font-size: 0.95rem; }
.checkout-totals p { display: flex; justify-content: space-between; margin-bottom: calc(var(--spacing-unit) * 0.3); }
.checkout-totals hr { margin: calc(var(--spacing-unit) * 0.5) 0; border-color: var(--border-color); opacity: 0.5;}
.checkout-totals strong { font-weight: bold; }

.checkout-payment h3 { font-size: 1.1rem; margin: calc(var(--spacing-unit) * 1) 0 calc(var(--spacing-unit) * 0.5) 0; }
.payment-option {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #f0f0f0;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.payment-option.selected { border-color: var(--primary-color); opacity: 1; background-color: #e7f3ff; }
.payment-option label { font-weight: normal; display: flex; align-items: center; cursor: pointer; margin-bottom: 0; }
.payment-option input[type="radio"] { margin-right: 0.5rem; }
.payment-option i { margin-right: 0.3rem; color: var(--success-color);}

.place-order-form { margin-top: var(--spacing-unit); }
.btn-place-order { width: 100%; font-size: 1.1rem; padding: calc(var(--spacing-unit) * 0.7); }


/* My Orders */
.my-orders-container h1 { font-size: 1.5rem; margin-bottom: var(--spacing-unit); }
.order-list { display: flex; flex-direction: column; gap: var(--spacing-unit); }
.order-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.order-header {
  background-color: #f8f9fa;
  padding: calc(var(--spacing-unit) * 0.6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
}
.order-header > div { margin-right: calc(var(--spacing-unit) * 0.8); margin-bottom: calc(var(--spacing-unit) * 0.2); white-space: nowrap; }
.order-header strong { color: var(--text-color); }
.order-status { display: inline-block; } /* Used within header */

.order-body { padding: calc(var(--spacing-unit) * 0.75); display: flex; flex-direction: column; gap: calc(var(--spacing-unit) * 0.75); }

/* Order Item Images (Shared) */
.order-items-images { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 0; list-style: none; }
.order-item-thumbnail {
    display: inline-block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) * 0.75);
    border: 1px solid var(--border-color);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    vertical-align: middle;
    background-color: #f8f9fa;
}
.order-item-thumbnail:hover { opacity: 0.85; transform: scale(1.05); z-index: 10; }
.order-item-thumbnail-placeholder {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border-radius: calc(var(--border-radius) * 0.75);
    border: 1px dashed var(--secondary-color); background-color: var(--light-color); color: var(--secondary-color); font-size: 0.6rem; font-weight: bold; text-align: center; text-decoration: none; transition: background-color 0.2s ease-in-out; vertical-align: middle; line-height: 1; padding: 2px;
}
.order-item-thumbnail-placeholder:hover { background-color: #e2e6ea; text-decoration: none; }

.order-details { font-size: 0.9rem; line-height: 1.5;}
.order-details p { margin-bottom: calc(var(--spacing-unit) * 0.3); }
.order-actions { padding: 0 calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 0.75); text-align: right; }


/* Status Badge */
.status-badge {
    font-weight: bold;
    padding: 0.2em 0.5em;
    border-radius: var(--border-radius);
    color: #333;
    background-color: var(--secondary-color);
    font-size: 0.85em;
    display: inline-block;
    vertical-align: middle;
    text-transform: capitalize;
}
.status-pending, .status-badge.status-pending { background-color: #fff3cd; color: #856404; }
.status-out-for-delivery, .status-badge.status-out-for-delivery { background-color: #d1ecf1; color: #0c5460; }
.status-delivered, .status-badge.status-delivered { background-color: #d4edda; color: #155724; }
.status-cancelled, .status-badge.status-cancelled { background-color: #f8d7da; color: #721c24; }
.status-approved, .status-badge.status-approved { background-color: #d4edda; color: #155724; }
.status-rejected, .status-badge.status-rejected { background-color: #f8d7da; color: #721c24; }

.order-card.status-cancelled, .data-table tr.status-cancelled { opacity: 0.9; }
.data-table tr.status-rejected { opacity: 0.85; }
.data-table tr.status-pending { /* Optional: style pending rows */ }

/* Admin/Seller Pages */
.admin-manage-container, .admin-dashboard-container { padding: var(--spacing-unit); }
.admin-manage-container h1, .admin-dashboard-container h1 { font-size: 1.5rem; margin-bottom: var(--spacing-unit); border-bottom: 1px solid var(--border-color); padding-bottom: calc(var(--spacing-unit) * 0.5); }


/* Responsive Tables */
.table-container { overflow-x: auto; margin-bottom: var(--spacing-unit); }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.data-table thead {
  display: none;
  background-color: #f8f9fa;
  font-weight: 500;
  color: var(--dark-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table th { padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 0.6); text-align: left; border-bottom: 1px solid var(--border-color); }

/* Mobile Table Rows (Card-like) */
.data-table tbody tr {
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 1);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: calc(var(--spacing-unit) * 0.8);
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease-in-out;
}
.data-table tbody tr:last-child { margin-bottom: 0; }
.data-table tbody tr:hover { box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); }

.data-table td { display: block; text-align: right; padding: calc(var(--spacing-unit) * 0.4) 0; position: relative; border-bottom: 1px dashed #eee; }
.data-table td:last-child { border-bottom: none; }
.data-table td::before { content: attr(data-label); position: absolute; left: 0; font-weight: 500; text-align: left; padding-right: 10px; color: var(--secondary-color); width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.85em; }

.table-img {
    max-width: 50px;
    border-radius: calc(var(--border-radius) * 0.75);
    display: inline-block;
    margin-left: 45%;
    vertical-align: middle;
}
.data-table td:has(img) { text-align: right; padding: 5px 0; }

/* Mobile Actions Cell */
.data-table td.actions-cell { padding-top: calc(var(--spacing-unit) * 0.6); }
.data-table td.actions-cell::before { display: none; }
.actions-cell .action-group { border-top: 1px solid #eee; padding-top: calc(var(--spacing-unit) * 0.6); margin-top: calc(var(--spacing-unit) * 0.6); text-align: left; }
.actions-cell .action-group:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.actions-cell .action-group-title { font-size: 0.8em; font-weight: bold; color: var(--secondary-color); margin-bottom: calc(var(--spacing-unit) * 0.4); display: block; text-align: left; }
.actions-cell form, .actions-cell .btn { margin: calc(var(--spacing-unit) * 0.25) 0; display: block; width: 100%; }
.actions-cell .inline-form { display: flex; flex-wrap: wrap; gap: calc(var(--spacing-unit) * 0.4); align-items: center; }
.actions-cell .inline-form input, .actions-cell .inline-form button { width: auto; flex-grow: 1; }
.actions-cell .inline-form button { flex-grow: 0; flex-shrink: 0; }
.actions-cell select.form-control-sm { margin-bottom: 5px; font-size: 0.9rem; padding: calc(var(--spacing-unit)*0.4) calc(var(--spacing-unit)*0.6); height: auto; width: 100%; }
.actions-cell .no-actions-text { display: block; text-align: left; margin-top: calc(var(--spacing-unit) * 0.5); color: var(--secondary-color); font-style: italic; }

/* Mobile Order Table Specifics */
.order-table td[data-label="Items"] .order-items-summary { font-size: 0.85em; line-height: 1.5; margin-bottom: calc(var(--spacing-unit) * 0.5); text-align: left; margin-left: 45%; }
.order-table td[data-label="Items"] .order-items-summary strong { color: var(--dark-color); }
.order-table .order-items-images { margin-top: calc(var(--spacing-unit) * 0.4); justify-content: flex-end; margin-left: 45%; }
.order-table td[data-label="Total"].order-total strong { font-size: 1.1em; color: var(--success-color); }
.order-table td[data-label="Status"] .status-badge { float: right; margin-bottom: 5px; }
.order-table td[data-label="Status"] small { clear: both; display: block; text-align: right; margin-top: calc(var(--spacing-unit) * 0.3); }

/* Mobile Delivery OTP */
.delivery-otp-display {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #e6ffed;
    border: 1px solid #b7e4c7;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    text-align: left;
    clear: both;
    margin-left: 45%;
}
.delivery-otp-display p { margin-bottom: 3px !important; }
.delivery-otp-code {
    font-weight: bold;
    color: #2b9348;
    font-size: 1.1em;
    margin: 0 3px;
    letter-spacing: 1px;
    background-color: #fff;
    padding: 1px 4px;
    border-radius: calc(var(--border-radius) * 0.5);
}
.delivery-otp-display small { display: block; margin-top: 3px; color: #555; }
.verify-otp-form { display: flex; align-items: center; gap: 5px; width: 100%; }
.verify-otp-form input[name="otp"] { flex-grow: 1; max-width: 150px; padding: calc(var(--spacing-unit)*0.4) calc(var(--spacing-unit)*0.6); font-size: 0.9rem; text-align: center; border-radius: var(--border-radius); }
.verify-otp-form button { flex-shrink: 0; width: auto; padding: calc(var(--spacing-unit)*0.4) calc(var(--spacing-unit)*0.6); font-size: 0.9rem; line-height: 1.4; }

/* Admin Actions Grid */
.admin-actions-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: var(--spacing-unit); margin-top: var(--spacing-unit); }
.admin-action-card {
    background-color: var(--card-bg);
    padding: var(--spacing-unit);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--text-color);
    text-decoration: none;
}
.admin-action-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); text-decoration: none; }
.admin-action-card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.admin-action-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; color: var(--text-color); }
.admin-action-card p { font-size: 0.85rem; color: var(--secondary-color); margin-bottom: 0.5rem; }


/* Error Page */
.error-container { text-align: center; padding-top: 2rem; }
.error-container h1 { color: var(--danger-color); margin-bottom: 0.5rem; }
.error-container .lead { font-size: 1.1rem; }
.error-container details {
    text-align: left;
    margin-top: 1rem;
    background: #f1f1f1;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}
.error-container details summary { cursor: pointer; font-weight: bold; }
.error-container details pre { white-space: pre-wrap; font-size: 0.8em; margin-top: 0.5rem; }


/* Profile Page */
.profile-container {
    max-width: 800px;
    margin: var(--spacing-unit) auto;
    padding: calc(var(--spacing-unit) * 1.5);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}
.profile-container h1 { font-size: 1.8rem; text-align: center; margin-bottom: calc(var(--spacing-unit) * 0.5); }
.profile-container > p.text-muted { text-align: center; font-size: 1.1rem; }
.profile-section { margin-top: calc(var(--spacing-unit) * 1.5); padding-top: calc(var(--spacing-unit) * 1); border-top: 1px solid var(--border-color); }
.profile-section:first-of-type { border-top: none; padding-top: 0; margin-top: calc(var(--spacing-unit) * 0.8); }
.profile-section h2 { font-size: 1.4rem; margin-bottom: calc(var(--spacing-unit) * 0.8); color: var(--primary-color); }
#saved-address-display p { margin-bottom: calc(var(--spacing-unit) * 0.3); line-height: 1.5; font-size: 1rem; }
#saved-address-display strong { font-weight: 500; }
#edit-address-btn, #add-address-btn { margin-top: calc(var(--spacing-unit) * 0.5); }
.address-form { max-width: 500px; }
.address-form h3 { font-size: 1.2rem; margin-bottom: var(--spacing-unit); font-weight: 500; }
#cancel-edit-btn { margin-left: calc(var(--spacing-unit) * 0.5); }
.dashboards-section .btn,
.orders-section .btn {
    margin-right: 10px; margin-bottom: 10px;
}
.logout-section .btn { min-width: 120px; }


/* Banner Slider Styles */
.banner-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 1;
  overflow: hidden;
  border-radius: var(--border-radius);
  background-color: #e0e0e0;
  touch-action: pan-y; /* Enable vertical scroll, handle horizontal swipe in JS */
  -webkit-tap-highlight-color: transparent; /* Optional: Remove tap highlight on mobile */
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out;
  background-color: #eee;
}

.banner-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.banner-link {
  display: block;
  width: 100%;
  height: 100%;
}

.banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation Arrows */
.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  opacity: 0.8;
}

.banner-nav:hover {
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

.banner-prev { left: 10px; }
.banner-next { right: 10px; }

/* Navigation Dots */
.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s ease;
}

.banner-dot.active { background-color: white; }


/* ============================ */
/* Category Icons Section       */
/* ============================ */

.category-icons-section {
    /* padding: calc(var(--spacing-unit) * 0.8) 0; */
}

.category-icons-section h2 {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--dark-color);
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--spacing-unit) * 0.6);
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(var(--spacing-unit) * 0.4);
  border-radius: calc(var(--border-radius) * 0.8);
  transition: background-color 0.2s ease-in-out, transform 0.15s ease-in-out;
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
}

.category-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transform: translateY(-2px);
}

.category-item.active {
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(-1px);
}
.category-item.active .category-name {
  color: var(--primary-color);
  font-weight: 500;
}


.category-icon-wrapper {
  width: 55px;
  height: 55px;
  margin-bottom: calc(var(--spacing-unit) * 0.4);
  background-color: rgb(255, 255, 255);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease;
}
.category-item:hover .category-icon-wrapper {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.category-icon {
  max-width: 65%;
  max-height: 65%;
  object-fit: contain;
  display: block;
}

.category-name {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.3;
  color: rgb(66, 66, 66);
}

/* ============================ */
/* **** Pincode Lookup Styles **** */
/* ============================ */

/* Style for the container holding auto-filled fields */
.auto-filled-fields-container {
    background-color: #f8f9fa; /* Light grey background */
    border-left: 3px solid var(--primary-color); /* Accent border */
    padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 0.8);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-top: calc(var(--spacing-unit) * -0.5); /* Pull slightly closer to pincode */
    margin-bottom: var(--spacing-unit);
}

.auto-filled-fields-container .form-group {
    margin-bottom: calc(var(--spacing-unit) * 0.5); /* Reduce margin inside */
}

.auto-filled-fields-container .form-group:last-child {
    margin-bottom: 0;
}

/* Style for the read-only auto-filled fields */
.auto-filled-field[readonly] {
    background-color: #e9ecef; /* Standard readonly background */
    opacity: 1; /* Ensure full opacity */
    cursor: not-allowed;
    border: 1px solid #ced4da; /* Slightly lighter border */
    font-weight: 500; /* Make text slightly bolder */
    color: #495057; /* Standard text color */
}

/* Pincode status message styling */
.pincode-status {
    display: block; /* Ensure it takes its own line */
    margin-top: 4px;
    font-size: 0.8em;
    min-height: 1.2em; /* Reserve space */
    transition: color 0.2s ease-in-out; /* Smooth color transition */
}
.pincode-status.text-success { color: var(--success-color) !important; }
.pincode-status.text-danger { color: var(--danger-color) !important; }
.pincode-status.text-muted { color: var(--secondary-color) !important; }


/* ============================ */
/* Media Queries                */
/* ============================ */

/* --- Mobile Specific Search Bar --- */
@media (max-width: 767px) {
  .search-container-dynamic {
      position: static;
      order: 1;
  }
  .search-form-dynamic {
      position: absolute;
      top: calc(100% + 8px);
      left: var(--spacing-unit);
      right: var(--spacing-unit);
      width: calc(100% - (2 * var(--spacing-unit)));
      background-color: var(--card-bg);
      border: 1px solid var(--border-color);
      box-shadow: 0 3px 6px rgba(0,0,0,0.15);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px) scaleY(0.95);
      transform-origin: top center;
      transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
      z-index: 1005;
      border-radius: var(--border-radius);
      height: 42px;
  }
  .search-container-dynamic.active .search-form-dynamic {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scaleY(1);
      transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
  }
  .suggestions-dropdown {
      top: calc(100% + 8px + 42px + 4px);
      left: var(--spacing-unit);
      right: var(--spacing-unit);
      width: calc(100% - (2 * var(--spacing-unit)));
      z-index: 1010;
      border-top: 1px solid var(--border-color);
  }
   .search-container-dynamic.active .suggestions-dropdown.active {
      display: block;
   }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: calc(var(--spacing-unit) * 0.75);
    }
    .category-icon-wrapper { width: 60px; height: 60px; border-radius: 18px; }
    .category-name { font-size: 0.75rem; }
    .admin-actions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container { max-width: 720px; }
  .app-footer { display: block; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .product-name { height: auto; white-space: normal; display: block; -webkit-line-clamp: unset; -webkit-box-orient: unset; }
  .product-detail-main { flex-direction: row; align-items: flex-start; }
  .product-detail-info { flex: 1 1 60%; }
  .product-detail-image-section { flex: 1 1 40%; width: auto; max-width: none; margin: 0; }
  .product-actions { flex-direction: row; align-items: center; }
  .product-actions .btn { width: auto; }
  .quantity-selector { max-width: 120px; margin-bottom: 0; }
  .auth-container { margin: calc(var(--spacing-unit) * 2) auto; }
  .cart-item { grid-template-columns: 100px 1fr 100px 150px 80px; grid-template-areas: "image details price quantity remove"; align-items: center; padding: var(--spacing-unit); }
  .cart-item-details { grid-area: details; }
  .cart-item-price { display: block; grid-area: price; text-align: right; font-weight: 500; font-size: 1rem; color: var(--text-color); margin-bottom: 0; }
  .cart-item-quantity { grid-area: quantity; justify-content: center; }
  .cart-item-subtotal { display: none; }
  .cart-item-remove { grid-area: remove; align-self: center; text-align: center; }
  .checkout-grid { flex-direction: row; gap: calc(var(--spacing-unit) * 1.5); align-items: flex-start; }
  .checkout-address { flex: 1 1 55%; }
  .checkout-summary { flex: 1 1 45%; }

  /* --- Restore Table Layout --- */
  .data-table thead { display: table-header-group; }
  .data-table tbody tr { display: table-row; margin-bottom: 0; border: none; padding: 0; box-shadow: none; background-color: transparent; border-bottom: 1px solid var(--border-color); border-radius: 0; }
  .data-table tbody tr:last-child { border-bottom: none; }
  .data-table tbody tr:hover { background-color: #f1f5f9; }
  .data-table td { display: table-cell; text-align: left; padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 0.6); vertical-align: middle; border-bottom: none; position: static; margin-left: 0 !important; }
  .data-table td::before { content: none; }
  .table-img { max-width: 60px; margin-left: 0; }
  .data-table td:has(img) { text-align: left; width: 80px; }
  .data-table th[data-label*="Price"], .data-table td[data-label*="Price"],
  .data-table th[data-label*="Stock"], .data-table td[data-label*="Stock"],
  .data-table th[data-label*="Total"], .data-table td[data-label*="Total"],
  .data-table td.order-total { text-align: right; width: 100px; }
  .data-table th[data-label="Status"], .data-table td[data-label="Status"],
  .data-table td.order-status-cell { text-align: center; width: 150px; }
  .data-table td[data-label="Status"] .status-badge, .order-status-cell .status-badge { float: none; display: inline-block; }
  .order-status-cell small { text-align: center; }
  .data-table th.actions-cell, .data-table td.actions-cell { text-align: right !important; width: 250px; white-space: normal; }
  .actions-cell .action-group { border: none; padding: 0; margin: 0 0 calc(var(--spacing-unit) * 0.5) 0; display: block; text-align: right; }
  .actions-cell .action-group:last-child { margin-bottom: 0; }
  .actions-cell .action-group-title { display: none; }
  .actions-cell form, .actions-cell .btn { display: inline-block; width: auto; margin: 0 0 0 calc(var(--spacing-unit) * 0.3); vertical-align: middle; }
  .actions-cell .inline-form { display: inline-flex; width: auto; margin-left: 0; }
  .actions-cell .inline-form + .inline-form { margin-left: calc(var(--spacing-unit) * 0.3); }
  .actions-cell .verify-otp-form input { max-width: 100px; }
  .actions-cell select.form-control-sm { width: auto; display: inline-block; margin-right: 5px;}
  .actions-cell .no-actions-text { display: inline-block; text-align: right; width: 100%;}
  .w-md-auto { width: auto !important; }
  .order-table td[data-label="Items"] .order-items-summary { margin-left: 0; text-align: left; }
  .order-table .order-items-images { justify-content: flex-start; margin-left: 0; }
  .delivery-otp-display { margin-left: 0; margin-top: 5px; padding: 5px 8px; font-size: 0.85rem; display: inline-block; width: auto; text-align: center; }
  .delivery-otp-display p { margin-bottom: 0 !important; }
  .delivery-otp-display small { display: none; }
  /* --- End Table Restore --- */

  /* --- Header/Navbar for Tablet+ --- */
  .app-header { padding: calc(var(--spacing-unit) * 0.5) var(--spacing-unit); }
  .navbar { gap: var(--spacing-unit); }
  .app-logo .app-name { display: inline; }
  .app-logo { font-size: 1.2rem; }
  .search-toggle-btn { display: none; }

  .search-container-dynamic {
      display: flex;
      flex-grow: 1;
      justify-content: center;
      order: 0;
      margin: 0 calc(var(--spacing-unit) * 0.5);
      max-width: 500px;
      position: relative;
  }
  .nav-left { margin-right: 0; }

  .search-form-dynamic {
      position: relative;
      top: auto; left: auto; right: auto; width: 100%;
      box-shadow: none;
      opacity: 1; visibility: visible; transform: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
      height: 38px;
  }
  /* --- End Header/Navbar Tablet+ --- */


  /* Category Grid Tablet */
  .category-grid { grid-template-columns: repeat(6, 1fr); gap: calc(var(--spacing-unit) * 0.8); }
  .category-icon-wrapper { width: 65px; height: 65px; border-radius: 20px; }
  .category-name { font-size: 0.8rem; }
  .category-icons-section { padding: calc(var(--spacing-unit) * 1.2); }
  .category-icons-section h2 { font-size: 1.4rem; }

  /* Banner Slider Tablet */
  .banner-slider-container {
      aspect-ratio: 24 / 7;
      /* touch-action is inherited */
  }
  .banner-nav { width: 40px; height: 40px; font-size: 1rem; }
  .banner-dots { bottom: 15px; }
  .banner-dot { width: 10px; height: 10px; }

  /* Rating Stats Layout */
  .rating-stats-container { display: flex; align-items: flex-start; gap: calc(var(--spacing-unit) * 2); }
  .rating-summary { flex-direction: column; align-items: center; margin-bottom: 0; flex-basis: 150px; flex-shrink: 0; }
  .rating-average-value { font-size: 3em; }
  .rating-total { font-size: 1em; }
  .rating-bars { max-width: none; flex-grow: 1; margin: 0; }

  .profile-container { padding: calc(var(--spacing-unit) * 2); }

  /* Nav links Tablet+ */
  .nav-link { flex-direction: row; font-size: 0.9rem; align-items: center; padding: calc(var(--spacing-unit) * 0.4) calc(var(--spacing-unit) * 0.8); }
  .nav-link span { display: inline; margin-left: calc(var(--spacing-unit) * 0.3); }
  .nav-link i { font-size: 1rem; margin-bottom: 0; margin-right: 0; }
  .nav-right { gap: calc(var(--spacing-unit) * 0.75); }
  .profile-avatar-link { width: 38px; height: 38px; }
  .btn-login-register { font-size: 0.9rem; }
  .suggestions-dropdown { position: absolute; top: 100%; left: 0; right: 0; width: 100%; }


} /* End @media (min-width: 768px) */


/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container { max-width: 960px; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid, .admin-actions-grid { gap: calc(var(--spacing-unit) * 1); }
  .admin-actions-grid { grid-template-columns: repeat(3, 1fr); }
  .navbar { max-width: 960px; }

  /* Category Grid Desktop */
  .category-grid { grid-template-columns: repeat(8, 1fr); gap: var(--spacing-unit); }
  .category-icon-wrapper { width: 70px; height: 70px; border-radius: 22px; }
  .category-name { font-size: 0.85rem; }
  .category-icons-section { padding: calc(var(--spacing-unit) * 1.5); }

  .banner-slider-container { aspect-ratio: 24 / 6; }

} /* End @media (min-width: 992px) */


/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
    .navbar { max-width: 1140px; }
    .admin-actions-grid { grid-template-columns: repeat(4, 1fr); }
    /* Optional: Increase product grid columns */
    /* .product-grid { grid-template-columns: repeat(5, 1fr); } */
    /* Category Grid Large Desktop */
    /* .category-grid { grid-template-columns: repeat(10, 1fr); } */
    .category-icon-wrapper { width: 75px; height: 75px; border-radius: 25px; }
} /* End @media (min-width: 1200px) */

/* Add this rule or adjust existing margins */
.admin-manage-container .form-group.mb-3 { /* Target the specific filter group */
  margin-bottom: var(--spacing-unit) !important; /* Ensure space below filter */
}

/* Style for the "no results" row */
#no-admin-orders-found td,
#no-seller-orders-found td,
#no-admin-products-found td,
#no-seller-products-found td,
#no-admin-users-found td {
    text-align: center;
    padding: var(--spacing-unit);
    color: var(--secondary-color);
    font-style: italic;
}

/* Ensure hidden rows are truly hidden */
tr.hidden {
    display: none !important;
}

/* ============================ */
/* **** Product Image Slider Styles **** */
/* ============================ */

/* Container for the image section (either single or slider) */
.product-detail-image-section {
  position: relative;
  width: 100%; /* Full width on mobile */
  max-width: 450px; /* Limit width on larger screens if needed */
  margin: 0 auto var(--spacing-unit) auto; /* Center and add bottom margin on mobile */
  aspect-ratio: 1 / 1; /* Maintain square aspect ratio */
  overflow: hidden;
  border-radius: calc(var(--border-radius) + 2px);
  background-color: #f8f9fa; /* Placeholder background */
  border: 1px solid var(--border-color); /* Add a subtle border */
}
/* Desktop Layout Alignment (aligns with existing product detail layout) */
@media (min-width: 768px) {
  .product-detail-image-section {
      flex: 1 1 40%; /* Take 40% of the flex space */
      width: auto; /* Override mobile width */
      max-width: none; /* Remove max-width limit */
      margin: 0; /* Remove mobile margin */
  }
}

/* Slider specific container */
.product-image-slider-container {
  position: relative; /* Needed for absolute positioning of children */
  width: 100%;
  height: 100%;
  overflow: hidden; /* Hide slides outside the container */
  touch-action: pan-y; /* <<<--- ADD FOR PRODUCT SLIDER */
  -webkit-tap-highlight-color: transparent; /* <<<--- ADD FOR PRODUCT SLIDER */
}

.product-image-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Individual slide styling */
.product-image-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Hidden by default */
  visibility: hidden;
  transition: opacity 0.5s ease-in-out; /* Smooth fade transition */
  background-color: #eee; /* Fallback background if image is slow */
}

/* Active slide is visible */
.product-image-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1; /* Ensure active slide is on top */
}

/* The actual image element (shared by slider and single image) */
/* .product-detail-image styles are already defined above */

/* Slider Navigation Arrows */
.product-image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px; /* Adjust size as needed */
  height: 30px;
  font-size: 1rem; /* Adjust icon size */
  font-weight: bold;
  line-height: 1; /* Center icon vertically */
  cursor: pointer;
  z-index: 2; /* Above the slides */
  display: flex; /* Use flexbox to center icon */
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  opacity: 0.8; /* Slightly transparent */
  -webkit-tap-highlight-color: transparent; /* Prevent blue highlight on mobile tap */
}
.product-image-nav:hover,
.product-image-nav:focus {
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 1;
  outline: none; /* Remove default focus outline */
}
.product-image-prev { left: 8px; }
.product-image-next { right: 8px; }

/* Slider Navigation Dots */
.product-image-dots {
  position: absolute;
  bottom: 8px; /* Position dots at the bottom */
  left: 50%;
  transform: translateX(-50%); /* Center the dots horizontally */
  display: flex;
  gap: 6px; /* Space between dots */
  z-index: 2; /* Above the slides */
}
.product-image-dot {
  width: 7px; /* Size of the dots */
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6); /* Semi-transparent white */
  border: 1px solid rgba(0, 0, 0, 0.3); /* Subtle border */
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s ease;
  -webkit-tap-highlight-color: transparent; /* Prevent blue highlight on mobile tap */
}
.product-image-dot.active {
  background-color: white; /* Active dot is solid white */
}
.product-image-dot:focus {
   outline: 1px dotted white; /* Simple focus style for accessibility */
   outline-offset: 1px;
}


/* Optional: Container for the single image case (if you added it in the EJS) */
.product-detail-image-single {
  width: 100%;
  height: 100%;
}