:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --border-color: #000000;
  --secondary-text: #555555;
  --font-main: "Inter", sans-serif;
  --font-mono: "Space Mono", monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  background-color: var(--bg-color);
  z-index: 100;
  display: flex; /* Added flex */
  align-items: center; /* Center items vertically */
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  height: 40px;
  display: block;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.logo-text {
  font-weight: 900;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

/* Hero */
.hero {
  padding: 3rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.hero-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--secondary-text);
  text-transform: uppercase;
}

/* Layout */
.container {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 on Mobile */
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr); /* 4 columns on Desktop */
  }
}

/* Product Card */
.card {
  border: 1px solid var(--border-color);
  padding: 0; /* Removed padding for edge-to-edge image */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  background: white;
}

.card:hover {
  cursor: pointer;
  transform: translateY(-5px);
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.1); /* Subtle brutalist shadow */
}

.card-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  line-height: 1.3;
}

.card-price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-top: auto; /* Push to bottom of content */
  margin-bottom: 0;
}

.buy-button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: #000;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.8rem;
  border-top: 1px solid #000;
  text-transform: uppercase;
  border: none;
  border-top: 1px solid #222;
  letter-spacing: 0.5px;
}

/* Flatten the image inside card if we want, but for now purely text/layout based on "Nihilism" usually implies scarce images or harsh ones. 
   We will keep images as requested but style them stark. */
.card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  filter: grayscale(100%);
  border-bottom: 1px solid var(--border-color); /* Separator */
  display: block;
  margin: 0;
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-top: 2px solid var(--border-color);
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-icon {
  color: var(--text-color);
  transition: transform 0.2s;
}

.social-icon:hover {
  transform: scale(1.1);
}

.icon-img {
  width: 24px;
  height: 24px;
  display: block;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid #000;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 10px 10px 0px #000; /* Brutalist shadow */
}

.close-button {
  color: #000;
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 0.5;
}

.close-button:hover {
  color: #555;
}

#modal-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: grayscale(100%);
  border: 1px solid #000;
  margin-bottom: 1rem;
}

#modal-title {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

#modal-price {
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-bottom: 1rem;
  display: block;
}

#modal-description {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.buy-button-large {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: #000;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1rem;
  border: 1px solid #000;
}

.buy-button-large:hover {
  background-color: #fff;
  color: #000;
}

/* Payment Section */
.payment-section {
  margin-top: 2rem;
  border-top: 2px solid var(--border-color);
  padding-top: 1.5rem;
}

.payment-heading {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-card {
    border: 1px solid var(--border-color);
    padding: 1rem;
    background: #fff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align left */
    min-height: 60px;
    position: relative;
    gap: 1rem;
}

.payment-card:hover {
    border-color: #000;
    background-color: #f9f9f9;
    cursor: pointer;
}

.payment-card.active {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.payment-icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #eee; /* Placeholder bg */
}

.payment-icon-text {
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-mono);
    flex-grow: 1;
}

.check-icon {
    width: 20px;
    height: 20px;
    display: none; /* Hidden by default */
    fill: currentColor;
}

.payment-card.active .check-icon {
    display: block; /* Show when active */
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.nav-link:hover {
    text-decoration: underline;
}

/* OVO Instruction Grid */
.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.instruction-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Modal Image Grid */
.modal-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-grid-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.modal-image-single img {
    width: 100%;
    aspect-ratio: 1/1; /* Enforce square shape */
    border-radius: 8px;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* Horizontal Image Scroll */
/* Horizontal Image Scroll */
.modal-image-scroll {
    display: flex;
    flex-wrap: nowrap; /* Ensure no wrapping */
    overflow-x: auto;
    gap: 10px;
    scroll-snap-type: x mandatory;
    margin-bottom: 1rem;
    padding-bottom: 5px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch; /* Critical for iOS/Mobile momentum scroll */
}
.modal-image-scroll::-webkit-scrollbar {
    display: none;
}

.modal-scroll-image {
    flex: 0 0 100%; /* Force each image to take full width */
    width: 100%; /* Explicit width */
    scroll-snap-align: center;
    aspect-ratio: 1/1;
    object-fit: cover; /* Changed to cover for better aesthetics in 1:1 */
    background: #f0f0f0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1001; /* Above everything */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* Modal Hint */
.modal-hint {
    text-align: center;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-style: italic;
}

/* Detail View */
#detail-view {
    padding-top: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
    color: var(--text-color);
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.detail-price {
    font-size: 1.2rem;
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.detail-description-container {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #555;
}

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

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    background-color: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: var(--primary-color, #1a73e8); /* Fallback if var not defined */
    transform: scale(1.2);
}

/* Security Alert */
.security-alert {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
}

.security-alert strong {
    color: #856404;
    display: block;
    margin-bottom: 5px;
}

/* Video Styling */
video.modal-scroll-image {
    object-fit: cover; /* Ensure video fills the square */
    background: #000; /* nice background if loading */
}

/* Lightbox Video */
#lightbox-video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
