/* RESET + BASE STYLES */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; /* ✅ Added Mac-friendly fonts */
    color: #fff;
    background: url('https://images.unsplash.com/photo-1489987707025-afc232f7ea0f?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
}

/* Optional dark overlay for better text readability */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Transparent & Blurred Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar a {
    color: #ffffff !important;
    font-weight: 500;
}

.navbar a:hover {
    color: #ddd !important;
    text-decoration: underline;
}

/* HERO Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    z-index: 1;
}

.hero-content {
    z-index: 1;
    padding: 20px;
    max-width: 90%;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

.hero p {
    font-size: 1.25rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

/* BUTTONS */
.btn-light {
    padding: 10px 25px;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
    background-color: white;
    border: none;
    color: #333;
}

.btn-light:hover {
    transform: scale(1.05);
    background-color: #f1f1f1;
}

/* SHOP PAGE */
.shop-landing {
    height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.shop-half {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shop-half .overlay {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 8px;
}

.shop-half h2 {
    font-size: 2.5rem;
    font-weight: bold;
}

.shop-half.men {
    background-image: url('https://images.unsplash.com/photo-1512436991641-6745cdb1723f');
}

.shop-half.women {
    background-image: url('https://images.unsplash.com/photo-1556905055-8f358a7a47b2');
}

main,
.container,
.card,
form,
section,
.row {
    position: relative;
    z-index: 1;
}

#cart-alert-total,
#cart-alert-items {
    color: #c0c0c0 !important;  /* Bright green for totals */
    font-weight: 600;
    font-size: 14px;
}

#cart-alert small {
    color: #fff !important;  /* White text for small details */
    font-weight: 500;
    font-size: 13px;
}

#cart-alert {
    background-color: rgba(0, 0, 0, 0.9) !important; /* Dark background */
    color: #fff !important; /* White text */
    border: 1px solid #c0c0c0 !important; 
    border-radius: 10px;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
}

#cart-alert h6 {
    color: #fff !important;
}

#cart-alert p {
    color: rgba(255,255,255,0.8) !important;
}

#cart-alert.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ===== MOBILE-SPECIFIC FIXES ===== */
@media (max-width: 768px) {
    #cart-alert {
        /* Positioning */
        position: fixed;
        top: 80px; /* Below navbar/search */
        left: 50%;
        transform: translate(-50%, -20px);
        
        /* Sizing */
        width: 92vw;
        max-width: 320px;
        
        /* Z-Index Boost */
        z-index: 9999 !important; /* Above everything */
        
        /* Visual */
        box-shadow: 0 4px 20px rgba(0,0,0,0.3); /* Better visibility */
    }
    
    #cart-alert.show {
        transform: translate(-50%, 0);
    }
    
    /* Ensure other elements don't overlap */
    header, .search-bar, .dropdown {
        z-index: 100 !important; /* Lower than alert */
        position: relative; /* Contain stacking context */
    }
}

/* Account dropdown */
.dropdown-menu {
  background-color: #212529 !important;
  border: 1px solid #343a40 !important;
}

.dropdown-menu .dropdown-item {
  color: #f8f9fa !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: #343a40 !important;
  color: #fff !important;
}

.dropdown-divider {
  border-top: 1px solid #343a40 !important;
}

/* ✅ NEW STYLES FOR PRODUCT PAGE */

/* Category buttons */
.category-btn {
    background: #222;
    border-radius: 50px;
    padding: 6px 16px;
    margin: 4px;
    color: #fff;
    border: 1px solid #555;
    transition: all 0.3s ease;
}
.category-btn:hover, .category-btn.active {
    background: #ffcc00;
    color: #000;
    border-color: #ffcc00;
}

/* Search bar */
.stylish-search {
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.stylish-search::placeholder {
    color: rgba(255,255,255,0.7);
}

.stylish-search:focus {
    background-color: rgba(255,255,255,0.2);
    border-color: #fff;
    outline: none;
    box-shadow: 0 0 6px rgba(255,255,255,0.4);
}

/* Nuclear option CSS */
#product-grid .card {
    transition: height 0.3s ease !important;
    overflow: hidden !important;
}

#product-grid .card-img-top {
    height: 250px !important;
    object-fit: cover !important;
    width: 100% !important;
}

#product-grid .card-body {
    display: flex !important;
    flex-direction: column !important;
}

#product-grid .add-to-cart-form {
    margin-top: auto !important;
}

/* Uniform product images */
.stylish-img {
    height: 300px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

#product-grid .col {
    display: flex; /* Make each column stretch */
}

#product-grid .card {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Stretch card inside column */
}

.description-preview {
    color: #fff !important; /* Force white */
    max-height: 3.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Card Hover Animation */
#product-grid .card {
    transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
}

#product-grid .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* Image Zoom Animation */
#product-grid .card-img-top {
    transition: transform 0.6s ease-in-out;
}

#product-grid .card:hover .card-img-top {
    transform: scale(1.05); /* Subtle zoom */
}


/* Style dropdown items */
.dropdown-menu {
  z-index: 3000 !important;
}

/* Normal dropdown stays hidden until opened */
.dropdown-menu.category-grid {
  min-width: 350px;
  padding: 10px;
}

/* Apply grid only when opened */
.dropdown-menu.category-grid.show {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 5px;
}

/* ===== Order Progress Tracker Styling ===== */
.d-flex.position-relative {
  position: relative;
  margin: 30px auto;
  max-width: 800px;
}

/* Main line background */
.d-flex.position-relative .position-absolute {
  height: 8px !important;
  background: #444 !important;
  border-radius: 4px;
}

/* Filled line with gradient */
.d-flex.position-relative .position-absolute > div {
  height: 8px !important;
  border-radius: 4px;
  background: linear-gradient(90deg, #0dcaf0, #0d6efd, #198754) !important;
  transition: width 0.8s ease;
}

/* Circles */
.d-flex.position-relative .rounded-circle {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #6c757d;
  color: white;
  transition: background 0.3s ease;
  position: relative;
}

/* Completed steps with checkmark */
.d-flex.position-relative .bg-success {
  background: #198754 !important;
}

.d-flex.position-relative .bg-success::after {
  content: "✓";
  position: absolute;
  font-size: 16px;
  color: white;
  font-weight: bold;
}

/* Step labels */
.d-flex.position-relative small {
  font-size: 13px;
  margin-top: 4px;
  display: block;
  color: #ccc;
}

/* ===== Highlight current step with glow ===== */
.d-flex.position-relative .current-step {
  box-shadow: 0 0 10px 2px rgba(13, 202, 240, 0.7); /* Soft glow */
  animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
  from {
    box-shadow: 0 0 10px 2px rgba(13, 202, 240, 0.7);
  }
  to {
    box-shadow: 0 0 15px 4px rgba(13, 202, 240, 0.9);
  }
}

/* Dynamic gradient based on status */
.tracker-pending .position-absolute > div {
  background: linear-gradient(90deg, #ffc107, #ffdd57) !important; /* Yellow shades */
}

.tracker-processing .position-absolute > div {
  background: linear-gradient(90deg, #0dcaf0, #0d6efd) !important; /* Blue shades */
}

.tracker-shipped .position-absolute > div {
  background: linear-gradient(90deg, #0d6efd, #198754) !important; /* Blue → Green */
}

.tracker-delivered .position-absolute > div {
  background: linear-gradient(90deg, #198754, #28a745) !important; /* Greens */
}

/* Override Bootstrap button styling for prev/next */
#prev-btn, #next-btn {
  background: none !important; /* no background */
  border: none !important;     /* remove border */
  box-shadow: none !important; /* remove shadow */
  padding: 0 !important;       /* remove padding */
  width: auto !important;      /* no fixed width from Bootstrap */
  height: auto !important;     /* no fixed height */
  
  color: white !important;     /* arrow color */
  font-size: 28px !important;
  font-weight: bold;
  line-height: 1;
  z-index: 10;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
}

/* Hover effect */
#prev-btn:hover, #next-btn:hover {
  color: #f8f9fa !important;
  transform: translateY(-50%) scale(1.2);
}

/* Positioning outside image */
#prev-btn {
  left: -25px !important;
}

#next-btn {
  right: -25px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #prev-btn {
    left: 5px !important;  /* inside left edge */
  }
  #next-btn {
    right: 5px !important; /* inside right edge */
  }
}

/* 🔄 Custom Pagination Styling */
.pagination-custom .page-link {
    background-color: #212529; /* Dark background */
    color: #fff; /* White text */
    border: 1px solid #495057; /* Subtle border */
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin: 0 3px;
    transition: all 0.3s ease;
}

.pagination-custom .page-link:hover {
    background-color: #198754; /* Bootstrap green */
    color: #fff;
    border-color: #198754;
    box-shadow: 0 0 8px rgba(25, 135, 84, 0.6); /* Glow effect */
    text-decoration: none;
}

.pagination-custom .active .page-link {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(25, 135, 84, 0.6);
    pointer-events: none;
}

.pagination-custom .disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    color: #fff;
}

.product-description-box {
    max-height: 150px;
    overflow-y: scroll;           /* Always show scrollbar */
    overflow-x: hidden;           /* Prevent horizontal scroll */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    border: 1px solid #444;
    padding: 5px;
    background-color: transparent;
    color: inherit;
}

/* 🌑 Custom scrollbar for Chrome/Safari/Edge */
.product-description-box::-webkit-scrollbar {
    width: 6px;
}

.product-description-box::-webkit-scrollbar-track {
    background: #212529;
}

/* Firefox */
.product-description-box {
    scrollbar-width: thin;
    scrollbar-color: #198754 #212529;
}

@media (max-width: 768px) {
    .shop-landing {
        flex-direction: column; /* Stack instead of side by side */
    }
    .shop-half {
        flex: 1 1 100%;         /* Full width */
        min-height: 250px;      /* Adjust height for mobile */
    }
}

@media (max-width: 768px) {
    table thead {
        display: none;
    }
    table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #444;
        padding: 10px;
        border-radius: 5px;
        background: rgba(0,0,0,0.4);
    }
    table td {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border: none;
    }
}
