/* Base Styles */
:root {
  --primary: #000000;
  --secondary: #1a1a1a;
  --accent: #ff3366;
  --text: #f2f2f2;
  --text-muted: #999;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Montserrat', 'Arial', sans-serif;
  margin: 0;
  background: #111;
  color: var(--text);
  line-height: 1.6;
}

/* Header & Navigation */
header {
  background: var(--primary);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.cart-button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: var(--transition);
}

.cart-button:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

#cart-count {
  position: absolute;
  top: -5px;
  right: 0;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: var(--transition);
}

nav a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
#hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('https://images.unsplash.com/photo-1485462537746-965f33f7f6a7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
  background-size: cover;
  background-position: center;
  padding: 8rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

#hero h2 {
  font-size: 3rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 800;
}

#hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Products Section */
#shop {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

#shop h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

#shop h2::after {
  content: '';
  display: block;
  width: 60%;
  height: 3px;
  background: var(--accent);
  margin: 0.5rem auto 0;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding: 1rem;
  margin: 0 auto;
  max-width: 1400px;
}

.product {
  background: var(--secondary);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.product-image {
  position: relative;
  overflow: hidden;
  padding-top: 125%; /* 4:5 aspect ratio */
  background: #000;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product:hover .product-image img {
  transform: scale(1.05);
  opacity: 0.8;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: var(--transition);
}

.product:hover .product-overlay {
  opacity: 1;
}

.quick-view {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  transition: var(--transition);
  transform: translateY(20px);
  opacity: 0;
}

.product:hover .quick-view {
  transform: translateY(0);
  opacity: 1;
}

.quick-view:hover {
  background: #e62e5c;
  transform: translateY(-2px);
}

.product h3 {
  margin: 1.2rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.price {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.add-to-cart {
  width: 80%;
  margin: 1rem auto;
  padding: 0.8rem;
  background: transparent;
  color: var(--text);
  border: 1px solid #444;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.add-to-cart:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: var(--primary);
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 2rem 2rem;
  margin-top: 5rem;
}

footer p {
  margin: 0.5rem 0;
}

footer nav {
  margin: 1.5rem 0;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: var(--transition);
}

footer a:hover {
  color: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  nav {
    gap: 0.5rem;
  }
  
  #hero h2 {
    font-size: 2rem;
  }
  
  .products {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.product {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.product:nth-child(2) { animation-delay: 0.1s; }
.product:nth-child(3) { animation-delay: 0.2s; }
.product:nth-child(4) { animation-delay: 0.3s; }

/* Modal Styles */
#cart-modal,
#quick-view-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow-y: auto;
}

.modal-content {
  background: var(--secondary);
  margin: 5% auto;
  padding: 2rem;
  width: 90%;
  max-width: 800px;
  border-radius: 10px;
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

/* Cart Styles */
#cart-items {
  max-height: 400px;
  overflow-y: auto;
  margin: 1rem 0;
  padding-right: 1rem;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem;
}

.item-details {
  flex: 1;
}

.item-details h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.remove-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
  transition: var(--transition);
}

.remove-item:hover {
  color: var(--accent);
  transform: scale(1.2);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  font-size: 1.2rem;
  font-weight: 600;
}

#checkout-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: var(--transition);
}

#checkout-btn:hover {
  background: #e62e5c;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 51, 102, 0.3);
}

/* Quick View Styles */
.quick-view-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quick-view-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  border-radius: 8px;
}

.quick-view-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-view-details {
  padding: 1rem 0;
}

.quick-view-details h3 {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

.quick-view-details .price {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 600;
  margin: 1rem 0;
}

.quantity-selector {
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantity-selector input {
  width: 70px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  border-radius: 4px;
  text-align: center;
}

/* Responsive Design */
@media (min-width: 768px) {
  .quick-view-container {
    flex-direction: row;
  }
  
  .quick-view-image {
    flex: 1;
  }
  
  .quick-view-details {
    flex: 1;
    padding: 0 0 0 2rem;
  }
}

@media (max-width: 767px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #hero h2 {
    font-size: 2rem;
  }
  
  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }
  
  .cart-item {
    flex-wrap: wrap;
  }
  
  .cart-item img {
    width: 60px;
    height: 60px;
  }
}