
/* --- Global Resets & Layout --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; transition: all 0.2s; }
img { max-width: 100%; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
header { position: sticky; top: 0; z-index: 100; padding: 15px 0; backdrop-filter: blur(10px); }
.header-content { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; }
.brand img { max-height: 40px; width: auto; }
.search-container { position: relative; flex-grow: 1; max-width: 500px; }
#search-input { width: 100%; padding: 12px 20px; padding-left: 45px; border: 1px solid #cbd5e1; border-radius: 99px; font-size: 1rem; transition: all 0.2s; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z' /%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 15px center; background-size: 20px; }
#search-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
#search-results { position: absolute; top: 110%; left: 0; right: 0; background: white; border-radius: 12px; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); border: 1px solid #e2e8f0; max-height: 400px; overflow-y: auto; display: none; z-index: 101; }
.search-result-item { display: flex; align-items: center; padding: 10px 15px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.search-result-item:hover { background-color: #f8fafc; }
.search-result-item img { width: 40px; height: 50px; object-fit: cover; border-radius: 4px; margin-right: 15px; }
.search-result-info h4 { margin: 0; font-size: 0.95rem; }
main { padding: 40px 0; }
.grid-title { font-size: 2rem; font-weight: 700; margin-bottom: 30px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.product-card { border-radius: var(--radius); overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; position: relative; top: 0; }
.image-wrapper { position: relative; padding-top: 130%; overflow: hidden; background-color: #f1f5f9; }
.product-card img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover img { transform: scale(1.05); }
.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.btn-view { color: var(--primary-color); font-weight: 600; font-size: 0.9rem; margin-top: auto; display: flex; align-items: center; }
.btn-view::after { content: '→'; margin-left: 5px; transition: margin 0.2s; }
.product-card:hover .btn-view::after { margin-left: 10px; }
.pagination { margin-top: 50px; display: flex; justify-content: center; gap: 5px; }
.page-link { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid #e2e8f0; font-weight: 500; transition: all 0.2s; }
.breadcrumb { margin-bottom: 20px; font-size: 0.9rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-color); }
.product-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; margin-bottom: 60px; }
.product-img-container { border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); padding: 10px; border: 1px solid #e2e8f0; background: white; }
.product-img-container img { width: 100%; border-radius: var(--radius); }
.product-info h1 { font-size: 2.5rem; font-weight: 800; margin: 0 0 20px 0; line-height: 1.2; }
.product-description { font-size: 1.05rem; white-space: pre-wrap; margin-bottom: 30px; }
.btn-download { display: inline-block; font-size: 1.1rem; font-weight: 600; padding: 15px 40px; border-radius: var(--btn-radius); transition: all 0.2s; border: none; cursor: pointer; font-family: inherit; }
.btn-download:hover { transform: translateY(-2px); }
.related-section { border-top: 1px solid #e2e8f0; padding-top: 40px; }
.related-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 25px; }
footer { text-align: center; padding: 40px 0; margin-top: 60px; border-top: 1px solid #e2e8f0; color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 768px) { .product-layout { grid-template-columns: 1fr; } .product-info h1 { font-size: 2rem; } .btn-download { width: 100%; text-align: center; } .header-content { flex-direction: column; align-items: stretch; } .search-container { max-width: 100%; margin-top: 15px; } }
@media (max-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; } .card-content { padding: 15px; } .card-title { font-size: 0.9rem; -webkit-line-clamp: 3; } .card-desc { display: none; } .btn-view { font-size: 0.85rem; } }

/* --- Checkout Modal Styles --- */
#nf-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  animation: nfFadeIn 0.25s ease;
}
#nf-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
#nf-container {
  background: #ffffff;
  border-radius: var(--radius, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: min(520px, 95vw);
  height: 600px;
  overflow: hidden;
  position: relative;
  animation: nfSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#nf-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 32px;
  text-align: center;
  color: #475569;
  font-weight: 700;
  z-index: 99999;
  transition: background 0.2s, transform 0.2s;
}
#nf-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}
#nf-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
#nf-loader {
  position: absolute;
  inset: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99990;
}
.nf-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: nfSpin 0.8s linear infinite;
}
@keyframes nfFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes nfSlideUp { from { opacity: 0; transform: translateY(30px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes nfSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- THEME OVERRIDES --- */

                :root { --primary-color: #78350f; --primary-dark: #451a03; --action-color: #d97706; --action-dark: #b45309; --bg-color: #fafaf9; --card-bg: #ffffff; --text-main: #44403c; --text-muted: #78716c; --font-family: 'Merriweather', serif; --radius: 8px; --btn-radius: 8px; }
                body { background-color: var(--bg-color); color: var(--text-main); font-family: var(--font-family); }
                header { background-color: #fffbeb; border-bottom: 2px solid #e7e5e4; }
                .product-card { border: 1px solid #e7e5e4; box-shadow: none; }
                .product-card:hover { border-color: var(--action-color); transform: translateY(-2px); }
                .btn-download { background-color: var(--action-color); color: white; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
                h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--primary-color); }
            