/* =========================================
   GLOBAL VARIABLES & RESET
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors */
  --deep-navy: #0A1128;
  --electric-blue: #007BFF;
  --electric-blue-hover: #0056b3;
  --white: #FFFFFF;
  
  /* UI Colors */
  --light-gray: #F4F5F7;
  --text-dark: #333333;
  --text-light: #666666;
  --border-color: #E2E8F0;
  
  /* Layout */
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-gray);
  color: var(--text-dark);
  line-height: 1.6;
  /* Adjust this number if your header is taller or shorter */
    padding-top: 69px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================
   HEADER & NAVBAR
   ========================================= */
.main-header {
    background-color: var(--deep-navy);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--electric-blue);
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--electric-blue);
}

/* Highlight the active navigation link */
.nav-links a.active {
    color: var(--electric-blue); /* Let's use your custom variable from line 99! */
    font-weight: bold;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: 4px;
  overflow: hidden;
  width: 300px;
}

.search-bar input {
  border: none;
  padding: 10px 15px;
  width: 100%;
  outline: none;
  font-family: inherit;
}

.search-bar button {
  background-color: var(--electric-blue);
  color: var(--white);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-bar button:hover {
  background-color: var(--electric-blue-hover);
}

/* Header Actions (Cart) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--electric-blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  height: 18px;
  width: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--white);
  transition: 0.3s;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
  .search-bar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--deep-navy);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .nav-links.active {
    max-height: 300px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links li {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links a {
    display: block;
    padding: 15px 0;
  }

  .search-bar {
    display: none; /* Hide search on mobile header, can add a search icon instead */
  }
}

/* =========================================
   UTILITIES & BUTTONS
   ========================================= */
.section-padding {
  padding: 60px 20px;
}

.section-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
  color: var(--deep-navy);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--electric-blue);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--electric-blue-hover);
}

.block-btn {
  display: block;
  width: 100%;
}

/* =========================================
   HERO SLIDER
   ========================================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background-color: var(--deep-navy);
}

.slider-container {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: var(--white);
  max-width: 500px;
}

.slide-content h2 {
  font-size: 48px;
  margin-bottom: 15px;
  line-height: 1.2;
}

.slide-content p {
  font-size: 18px;
  margin-bottom: 25px;
}

/* Slider Controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 10;
}

.slider-btn:hover {
  background-color: var(--electric-blue);
}

.prev { left: 20px; }
.next { right: 20px; }

/* =========================================
   CATEGORIES SECTION
   ========================================= */
.category-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.icon-circle {
  width: 80px;
  height: 80px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.category-card:hover .icon-circle {
  box-shadow: 0 8px 15px rgba(0, 123, 255, 0.2);
  border: 2px solid var(--electric-blue);
}

.category-card span {
  font-weight: 600;
  color: var(--text-dark);
}

/* =========================================
   PRODUCT GRID
   ========================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.product-info {
  padding: 20px;
}

.product-info h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--deep-navy);
}

.product-info .price {
  font-weight: 700;
  color: var(--electric-blue);
  font-size: 18px;
  margin-bottom: 15px;
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
  background-color: var(--deep-navy);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 20px;
  margin-bottom: 20px;
}

.footer-col h4 span {
  color: var(--electric-blue);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a:hover {
  color: var(--electric-blue);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a:hover {
  color: var(--electric-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: #aaa;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .slide-content h2 {
    font-size: 32px;
  }
  .hero-slider {
    height: 400px;
  }
}

/* =========================================
   SHOP PAGE LAYOUT (Electronics, Computers, etc.)
   ========================================= */
.page-header {
  text-align: center;
  padding-bottom: 20px;
}

.page-header h2 {
  font-size: 36px;
  color: var(--deep-navy);
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-light);
  font-size: 16px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 250px 1fr; /* 25% Sidebar, 75% Grid (approx) */
  gap: 40px;
  padding-bottom: 60px;
  align-items: start;
}

/* Sidebar Filters */
.sidebar {
  background-color: var(--white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  position: sticky;
  top: 90px; /* Sticks when scrolling */
}

.filter-group {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--deep-navy);
}

.filter-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group input[type="checkbox"] {
  accent-color: var(--electric-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Mobile Filter Toggle */
.mobile-filter-btn {
  display: none;
  margin-bottom: 20px;
}

/* Enhancing Product Cards for Shop Pages */
.product-card .description {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.4;
  height: 36px; /* Limits to ~2 lines */
  overflow: hidden;
}

.product-card .rating {
  color: #FFD700; /* Gold */
  font-size: 14px;
  margin-bottom: 10px;
}

/* Shop Layout Responsiveness */
@media (max-width: 992px) {
  .shop-layout {
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .shop-layout {
    grid-template-columns: 1fr; /* Stacks vertically */
  }

  .mobile-filter-btn {
    display: block; /* Show filter button */
  }

  .sidebar {
    display: none; /* Hide sidebar by default on mobile */
    position: static;
    margin-bottom: 20px;
  }

  .sidebar.active {
    display: block; /* Show when toggled */
  }

  /* Grid switches to 2 columns on tablets/large phones */
  .product-area .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Grid switches to 1 column on small phones */
  .product-area .product-grid {
    grid-template-columns: 1fr;
  }
}



/* =========================================
   SHOPPING CART PAGE
   ========================================= */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr; /* Items take up 2/3, Summary takes 1/3 */
  gap: 40px;
  padding-bottom: 80px;
  align-items: start;
}

/* Cart Items Container */
.cart-items-section {
  background-color: var(--white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.item-details {
  flex: 1;
}

.item-details h4 {
  font-size: 16px;
  color: var(--deep-navy);
  margin-bottom: 5px;
}

.item-details .item-price {
  color: var(--electric-blue);
  font-weight: 600;
  margin-bottom: 10px;
}

/* Quantity Control (+ / -) */
.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: fit-content;
  overflow: hidden;
}

.qty-btn {
  background-color: var(--light-gray);
  border: none;
  width: 35px;
  height: 35px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background-color: #e2e8f0;
}

.qty-input {
  width: 40px;
  height: 35px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  font-family: inherit;
}

/* Remove Button */
.remove-btn {
  background: none;
  border: none;
  color: #dc3545; /* Red */
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 20px;
}

.remove-btn:hover {
  text-decoration: underline;
}

/* Order Summary Box */
.cart-summary {
  background-color: var(--white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  position: sticky;
  top: 90px;
}

.cart-summary h3 {
  font-size: 20px;
  color: var(--deep-navy);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.summary-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 20px 0;
}

.total-row {
  font-size: 20px;
  font-weight: 700;
  color: var(--deep-navy);
}

.checkout-btn {
  font-size: 16px;
  padding: 15px;
  margin-top: 10px;
}

.secure-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 13px;
  color: #28a745; /* Green */
}

/* Empty Cart State */
.empty-cart {
  text-align: center;
  padding: 50px 20px;
}

.empty-cart h3 {
  margin-bottom: 15px;
  color: var(--deep-navy);
}

/* Cart Responsiveness */
@media (max-width: 992px) {
  .cart-layout {
    grid-template-columns: 1fr; /* Stack vertically on tablets */
  }
  .cart-summary {
    position: static;
  }
}

@media (max-width: 576px) {
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }
  .remove-btn {
    position: absolute;
    top: 20px;
    right: 0;
    margin: 0;
  }
}


/* --- Lightbox Styles --- */
.lightbox-overlay {
    display: none; /* Completely hidden until we call it */
    position: fixed;
    z-index: 9999; /* Makes sure it sits on top of your header/nav */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 22, 34, 0.85); /* A dark, elegant tech palette overlay */
    align-items: center;
    justify-content: center;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; /* A quick pop-in animation */
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.lightbox-close:hover {
    color: #007bff; /* Turns blue when you hover over the X */
}

/* Makes your product images show a pointing finger cursor so users know to click */
.product-card img {
    cursor: pointer; 
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Text Lightbox Styles --- */
.lightbox-text-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
    text-align: left; /* Ensures paragraphs are easy to read */
}

.lightbox-close-text {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #555;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.lightbox-close-text:hover {
    color: #dc3545; /* Turns red when hovered */
}

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
    z-index: 10000;
}
.lb-arrow:hover { background-color: #007bff; }
#lb-prev { left: 20px; }
#lb-next { right: 20px; }

/* --- Expandable Search Bar --- */
.expandable-search-input {
    width: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0;
    transition: all 0.4s ease-in-out;
    overflow: hidden;
}

/* This is the class Javascript will add when clicked */
.expandable-search-input.active {
    width: 250px !important;
    padding: 8px 15px !important;
    opacity: 1;
    border: 1px solid #ccc !important;
}


/* --- Mobile Menu Spacing Fix --- */
@media (max-width: 768px) {
    /* Reduce the gap if the container uses flexbox */
    .nav-links {
        gap: 0px !important; 
    }
	
	

    /* Tighten the padding on the actual clickable links */
    .nav-links a {
        padding: 8px 15px !important; /* Drops the vertical spacing so more items fit */
        font-size: 1rem !important;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Adds a super subtle, premium divider line */
    }

    /* Remove the border from the very last item so it looks clean */
    .nav-links a:last-child {
        border-bottom: none;
    }
	
	/* NEW: Full Screen & Transparent Glass Effect */
    .nav-links.active {
        height: 100vh !important; /* Expands the toggle all the way to the bottom of the screen */
        background-color: rgba(5, 22, 34, 0.85) !important; /* Your brand dark blue, but 15% see-through */
        backdrop-filter: blur(8px); /* Blurs the background image underneath so text stays readable */
        overflow-y: auto; /* Allows scrolling inside the menu if you add a ton of pages later */
        padding-bottom: 50px; /* Gives a little breathing room at the bottom */
    }
}