/* ===== ROOT VARIABLES ===== */
:root {
  --primary-dark: #1a1a2e;
  --secondary-dark: #16213e;
  --accent-gold: #f4a261;
  --accent-red: #e63946;
  --text-light: #edf2f4;
  --text-muted: #8d99ae;
  --card-bg: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: var(--primary-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== NAVIGATION BAR ===== */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%) !important;
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition);
}

.navbar-brand:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 80%;
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-dark {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #e76f51 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-success {
  background: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-outline-light {
  border: 2px solid white;
  color: white;
}

.btn-outline-light:hover {
  background: white;
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card img {
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover img {
  transform: scale(1.08);
}

.card-img-top {
  transition: var(--transition);
}

.product-card:hover .card-img-top {
  filter: brightness(1.1);
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* ===== RATING STARS ===== */
.rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.5rem 0;
}

.rating .star {
  color: #ffd700;
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.rating .star.empty {
  color: #e0e0e0;
}

.rating .star.half {
  position: relative;
  color: #ffd700;
  opacity: 0.7;
}

/* ===== FORMS ===== */
.form-control, .form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem;
  transition: var(--transition);
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 0.2rem rgba(244, 162, 97, 0.25);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

/* ===== CARDS & CONTAINERS ===== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: var(--card-bg);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card.shadow-sm {
  box-shadow: var(--shadow-sm);
}

/* ===== ALERTS ===== */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 1rem 1.25rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: linear-gradient(135deg, #06d6a0 0%, #73c6b6 100%);
  color: white;
}

.alert-danger {
  background: linear-gradient(135deg, var(--accent-red) 0%, #f07167 100%);
  color: white;
}

.alert-warning {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #f4a261 100%);
  color: white;
}

.alert-info {
  background: linear-gradient(135deg, #118ab2 0%, #06d6a0 100%);
  color: white;
}

/* ===== TABLES ===== */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
}

.table-dark th {
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: #f8f9fa;
  transform: scale(1.01);
}

.table td {
  vertical-align: middle;
  padding: 1rem;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  color: var(--text-light);
  margin-top: 5rem;
}

footer h5 {
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

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

footer a:hover {
  color: var(--accent-gold);
  transform: scale(1.2);
}

footer .bi {
  transition: var(--transition);
}

footer .bi:hover {
  transform: scale(1.3) rotate(5deg);
}

/* ===== CHECKOUT PAGE STYLES ===== */
.checkout-container {
  max-width: 800px;
  margin: 2rem auto;
}

.payment-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.card-logos {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.card-logo {
  height: 18px;
  opacity: 0.6;
  transition: var(--transition);
  cursor: pointer;
}

.card-logo:hover,
.card-logo.active {
  opacity: 1;
  transform: scale(1.1);
}

.input-group-text {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  color: white;
  border: none;
}

.card-input {
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.cvv-input {
  text-align: center;
  font-weight: 600;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.order-summary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.order-summary h4 {
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 1rem;
}

.order-total {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--primary-dark);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.4rem;
  }
  
  .product-card img {
    height: 180px;
  }
  
  .payment-card {
    padding: 1.5rem;
  }
  
  .card-logos {
    flex-wrap: wrap;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #6fdc8c 0%, #4fd1c5 100%);
  padding: 3rem 0;
  text-align: center;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid #6fdc8c;
  overflow: hidden;
}

.hero::before {
  content: none !important;
}

.hero h1 {
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
  z-index: 10;
  position: relative;
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}

.hero p {
  color: #f0f0f0 !important;
  font-size: 1.1rem;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== CONTACT PAGE ===== */
.contact-info {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.contact-info h5 {
  color: var(--accent-gold);
}

/* ===== QUANTITY SELECTOR ===== */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-select-sm {
  border-radius: 6px;
  font-weight: 600;
}

/* ===== PRODUCT DETAILS ===== */
.product-detail-img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.product-detail-img:hover {
  transform: scale(1.05);
}

/* ===== PRICE TAG ===== */
.price-tag {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ===== STOCK INDICATOR ===== */
.stock-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.in-stock {
  background: #06d6a0;
  color: white;
}

.low-stock {
  background: var(--accent-gold);
  color: white;
}

.out-of-stock {
  background: var(--accent-red);
  color: white;
}
