/* --- CSS VARIABLES FOR LUXURY PALETTE --- */
:root {
  --bg-color: #fdfbf7; /* "Alabaster" - A very subtle warm white */
  --text-color: #1a1a1a; /* Soft Black */
  --accent-color: #d4af37; /* Muted Gold */
  --light-gray: #e5e5e5;
}

/* --- GENERAL RESET & TYPOGRAPHY --- */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif; /* Clean sans-serif for body text */
  font-weight: 300;
}

h1,
h2,
h3,
.brand-name {
  font-family: "Playfair Display", serif; /* Elegant serif for headings */
  font-weight: 400;
}

/* --- HEADER & NAVIGATION --- */
header {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  max-width: 1200px;
}

.brand-name {
  font-size: 2.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
  cursor: pointer;
  transition: color 0.3s;
}

.brand-name:hover {
  color: #555;
}

/* Updated Icons Area */
.icons {
  display: flex;
  align-items: center;
}

.icons i {
  font-size: 1.2rem;
  margin-left: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.icons i:hover {
  color: var(--accent-color);
}

/* --- Menu Button Light Up Effect --- */
.menu-trigger:hover {
  color: var(--accent-color);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
  transform: scale(1.1);
}

/* Cart Wrapper & Badge */
.cart-wrapper {
  position: relative;
  cursor: pointer;
  margin-left: 20px;
}

.cart-wrapper i {
  margin-left: 0;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Lato", sans-serif;
  font-weight: bold;
}

/* --- SIDEBAR MENU STYLING --- */
#side-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-color);
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
  z-index: 2000;
  padding: 30px;
  box-sizing: border-box;
  transition:
    left 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
  opacity: 0;
  display: flex;
  flex-direction: column;
}

#side-menu.open {
  left: 0;
  opacity: 1;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.menu-logo {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

.menu-logo:hover {
  color: var(--accent-color);
}

.close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

.menu-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-color);
  border-left: 3px solid var(--accent-color);
  padding-left: 10px;
}

.menu-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  padding-left: 15px;
}

.menu-section li {
  padding: 8px 0;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #555;
  text-transform: capitalize;
}

.menu-section li:hover {
  color: var(--accent-color);
  padding-left: 10px;
}

.menu-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.social-icons {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  margin-top: 15px;
}

.social-icons i {
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  transition:
    color 0.3s,
    transform 0.3s;
}

.social-icons i:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  z-index: 1500;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

#overlay.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* --- CHECKOUT PAGE --- */
#checkout-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

#checkout-page.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.checkout-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  height: 100%;
  overflow-y: auto;
}

.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.checkout-title {
  font-size: 2rem;
  font-family: "Playfair Display", serif;
}

.checkout-items {
  margin-bottom: 40px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #f9f9f9;
}

.checkout-remove-btn {
  color: #ccc;
  cursor: pointer;
  margin-right: 15px;
  transition: color 0.3s;
}

.checkout-remove-btn:hover {
  color: red;
}

.checkout-total {
  font-size: 1.5rem;
  font-family: "Playfair Display", serif;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.checkout-btn {
  background-color: #1a1a1a;
  color: #fff;
  width: 100%;
  padding: 18px;
  border: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
  margin-top: 30px;
  cursor: pointer;
  transition: background 0.3s;
}

.checkout-btn:hover {
  background-color: #ffb3c7; /* Klarna Pink */
  color: #000;
}

/* Klarna Container (Initially Hidden) */
#klarna-container {
  margin-top: 30px;
  display: none;
  border: 1px solid #eee;
  min-height: 400px;
}

/* Checkout Suggestions */
.suggestions-title {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  color: #555;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* --- PRODUCT MODAL --- */
#product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  height: 500px;
  background-color: #fff;
  z-index: 2500;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

#product-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Modal Layout */
.modal-left {
  width: 50%;
  background-color: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #ccc;
}

.modal-right {
  width: 50%;
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-close-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

.modal-close-icon:hover {
  color: #333;
}

.modal-title {
  font-size: 2rem;
  margin: 0 0 10px 0;
}

.modal-price {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
  font-weight: 400;
}

.modal-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 30px;
}

/* Clothing Specific Options */
.clothing-options {
  display: none;
  margin-bottom: 30px;
}

.clothing-options.active {
  display: block;
}

.option-group {
  margin-bottom: 15px;
}

.option-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
  color: #888;
}

/* Custom Size Dropdown */
.size-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  font-family: "Lato", sans-serif;
  background: #fff;
  cursor: pointer;
}

/* Color Circles */
.color-options {
  display: flex;
  gap: 10px;
}
.color-circle {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: transform 0.2s;
}
.color-circle:hover {
  transform: scale(1.1);
  border-color: #333;
}
.c-black {
  background: #000;
}
.c-navy {
  background: #000080;
}
.c-beige {
  background: #f5f5dc;
}

/* Add to Cart Button */
.add-to-cart-btn {
  background-color: #1a1a1a;
  color: #fff;
  border: none;
  padding: 15px;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: auto;
}

.add-to-cart-btn:hover {
  background-color: #333;
}

/* --- THE CIRCLED TABS --- */
.nav-container {
  display: flex;
  gap: 20px;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--text-color);
  border-radius: 100px;
  padding: 12px 40px;
  font-family: "Lato", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s ease;
}

.tab-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.tab-btn.active {
  background-color: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
}

/* --- MAIN CONTENT LAYOUT --- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header p {
  font-style: italic;
  color: #666;
  margin-top: 10px;
}

/* --- PRODUCT GRID --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
}

.product-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  cursor: pointer;
}

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

.image-placeholder {
  width: 100%;
  height: 400px; /* Tall images for fashion */
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  position: relative;
  overflow: hidden;
}

/* Simulating an image load */
.image-placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, #f0f0f0 30%, #f9f9f9 38%, #f0f0f0 40%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
  opacity: 0.3;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.product-info {
  padding: 25px;
  text-align: center;
}

.product-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  margin-bottom: 8px;
  display: block;
}

.product-title {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  margin: 5px 0 10px 0;
  color: var(--text-color);
}

.product-price {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  color: var(--text-color);
}

/* --- UTILITY --- */
.hidden {
  display: none;
  animation: fadeOut 0.3s ease;
}

.fade-in {
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 60px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 60px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: #888;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.policy-menu {
  position: relative;
  text-align: center;
}
.policy-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
}
.policy-links {
  display: grid;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 230px;
  padding: 10px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}
.policy-menu:hover .policy-links,
.policy-menu:focus-within .policy-links,
.policy-menu.open .policy-links {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.policy-links a {
  padding: 10px 12px;
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: 0;
}
.policy-links a:hover,
.policy-links a:focus {
  background: #f8f5ed;
  color: #8c7122;
}

@media (max-width: 768px) {
  .policy-links {
    position: static;
    transform: translateY(8px);
    margin-top: 12px;
    text-align: left;
  }
  .policy-menu:hover .policy-links,
  .policy-menu:focus-within .policy-links,
  .policy-menu.open .policy-links {
    transform: translateY(0);
  }
  #product-modal {
    flex-direction: column;
    height: 90vh;
    overflow-y: auto;
  }
  .modal-left,
  .modal-right {
    width: 100%;
  }
  .modal-left {
    height: 300px;
  }
  .suggestions-grid {
    grid-template-columns: 1fr;
  }
}
.empty-cart-message {
  color: #888;
  text-align: center;
}
.checkout-loading {
  padding: 40px;
  color: #888;
  text-align: center;
}
.checkout-spinner {
  font-size: 2rem;
}
.checkout-loading-text {
  margin-top: 10px;
}
.suggestion-neutral {
  background-color: #f9f9f9;
}
.suggestion-light {
  background-color: #fdfdfd;
}
.follow-us-label {
  color: #999;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}
.loading-collection {
  width: 100%;
  text-align: center;
}
