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

/* Body and Global Styles */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
}

/* Container for centering content */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation Bar */
.nav {
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav .brand img {
  width: 100px;
  height: 50px;
  border-radius: 50%;
}

.nav .brand span {
  font-weight: 700;
  font-size: 20px;
}

.nav .nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav .nav-links a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav .nav-links a.active, .nav .nav-links a:hover {
  background-color: #ffe7f1;
  color: #fa0456;
}

.nav .btn {
  background-color: #fa0355;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav .btn:hover {
  background-color: #d91f69;
}

.nav .helper {
  color: #777;
}

/* ✅ FIX 1a: Cart button needs position: relative for badge positioning */
.cart-btn {
  position: relative; 
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ✅ FIX 1b: Styling for the count badge */
.badge {
  position: absolute;
  top: -15px;
  right: -10px;
  color: rgb(243, 2, 2);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  min-width: 24px; /* Ensures the badge is visible even for single digits */
  text-align: center;
}
/* =================================== */
/* Modal Content Styling */
/* =================================== */
.modal { 
   /* CRITICAL: Must be fixed to stay in viewport */
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* CRITICAL: Must span full viewport height */
  background: rgba(0, 0, 0, 0.5);
  
  /* CRITICAL: Use Flexbox to Center */
  display: none; /* Default state is hidden */
  align-items: center; /* Centers vertically */
  justify-content: center; /* Centers horizontally */
  z-index: 9999; /* Ensure it's on top */
}
.modal.active { 
    display: flex; 
}
.modal-content {
    background-color: white;
    padding: 30px; 
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    
    /* Set a reasonable size for the cart modal */
    max-width: 450px;
    width: 90%;
    max-height: 90vh; 
    
    /* Allows inner content (cart items) to scroll if the list is too long */
    overflow-y: auto; 
    
    position: relative;
    /* You can use flex-direction: column for vertical layout of content */
    display: flex;
    flex-direction: column;
}

/* Close button positioning */
.modal-content .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10; /* ✅ FIX 2: Ensures button is on top of all modal content, making it clickable */
}
.modal-content .close-btn svg {
    width: 24px;
    height: 24px;
    color: #777;
}

/* Cart Headers */
.modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Cart Items Layout */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.cart-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0; /* Prevents image from shrinking */
}

.cart-item-details {
    flex-grow: 1;
}
.cart-item-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px;
}
.cart-item-details p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.quantity-btn {
    background: #eee;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background: #ddd;
}

/* Cart Total and Checkout Button */
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    padding: 15px 0;
    margin-top: 10px;
    border-top: 2px solid #333; /* Strong line above total */
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #fa0137; /* Use a strong color for checkout */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.checkout-btn:hover {
    background-color: #003366;
}


.input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.input:focus {
  border-color: #ff4081;
  outline: none;
}

.helper {
  color: #777;
  font-size: 12px;
}


/* Product Cards (to be used in New Arrivals grid) */
.product-card {
  background-color: #fff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #eee;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.product-card .price {
  font-weight: 700;
  font-size: 18px;
  margin-top: 12px;
}

.product-card .rating {
  font-size: 14px;
  color: #777;
}

.product-card .btn {
  background-color: #f30353;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 16px;
  border: none;
  cursor: pointer;
}

.product-card .btn:hover {
  background-color: #d91f69;
}


/* Shop Page Specific Styles */
.toolbar {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 32px;
}

.toolbar h1 {
    font-size: 36px;
    font-weight: bold;
}

.searchbar {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 400px;
    flex-grow: 1;
}

.searchbar input {
    flex-grow: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.searchbar select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid.cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Product Card Styles */
#shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; /* Adjust the space between cards */
}
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.product-card .price {
    font-weight: 700;
    font-size: 18px;
    margin-top: 12px;
}

.product-card .rating {
    font-size: 14px;
    color: #777;
}

.product-card .btn {
    background-color: #f70254;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    border: none;
    cursor: pointer;
}

.product-card .btn:hover {
    background-color: #d91f69;
}

/* ===== Footer ===== */
footer{
  background:#000;         
  color:#fff;
  width:100%;
  margin-top:40px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

footer .containe{
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}

/* --- top area --- */
.footer-top{
  display:grid;
  grid-template-columns: 320px 1fr;  
  gap:48px;
  padding:56px 0 28px;
  align-items:start;
}

/* brand/info */
.footer-info img{
  width:44px;
  height:44px;
  border-radius:50%;
  object-fit:cover;
  display:block;
  margin:0 0 12px;
}
.footer-info p{
  margin:0 0 16px;
  color:#cbd5e1;                       
  max-width:28ch;
}
.footer-info div a{
  display:inline-block;
  margin-right:16px;
  font-size:18px;
  color:#e5e7eb;                        
  text-decoration:none;
  transition:color .2s ease;
}
.footer-info div a:hover{ color:#ffffff; }

/* link columns */
.footer-links{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:24px 48px;
}

.footer-column h3{
  margin:0 0 14px;
  font-size:18px;
  font-weight:800;
  color:#ffffff;
}

.footer-column ul{ margin:0; padding:0; list-style:none; }
.footer-column li{ margin:10px 0; }

.footer-column a{
  color:#f7f9fc;                       
  text-decoration:none;
  transition:color .2s ease;
}
.footer-column a:hover{ 
  color:#b91c1c;                          
  font-weight:700;
}

/* --- bottom bar --- */
.footer-bottom{
  border-top:1px solid #f3f3f8;           
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 0 26px;
}
.footer-bottom p{
  margin:0;
  color:#f0f1f3;
  font-size:14px;
}

/* ===== Responsive ===== */
@media (max-width: 992px){
  .footer-top{
    grid-template-columns:1fr;
    gap:28px;
  }
  .footer-links{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 560px){
  .footer-links{
    grid-template-columns:1fr;
  }
  .footer-bottom{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
}