/* ==========================================================================
   ROKULUS MAIN STYLESHEET
   Preloaded, loaded after critical CSS
   ========================================================================== */

/* -----------------------------
   TYPOGRAPHY
   ----------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-500);
}

strong, b {
    font-weight: 600;
}

small {
    font-size: var(--text-sm);
}

/* -----------------------------
   IMAGES
   ----------------------------- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent layout shift */
img[width][height] {
    height: auto;
}

/* Lazy load fade in */
img.lazy {
    opacity: 0;
    transition: opacity var(--transition-base);
}

img.lazy.loaded {
    opacity: 1;
}

/* -----------------------------
   FORMS
   ----------------------------- */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: var(--text-base);
}

/* -----------------------------
   SECTIONS
   ----------------------------- */
.section {
    padding-block: var(--section-gap);
}

.section--alt {
    background-color: var(--color-neutral-100);
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section__title {
    margin-bottom: var(--space-4);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-neutral-600);
    max-width: 40rem;
    margin-inline: auto;
}

/* -----------------------------
   GRID SYSTEM
   ----------------------------- */
.grid {
    display: grid;
    gap: var(--grid-gap);
}

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

.grid--3 {
    grid-template-columns: repeat(2, 1fr);
}

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

@media (min-width: 640px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* -----------------------------
   BUTTONS (extended)
   ----------------------------- */
.btn--secondary {
    background-color: transparent;
    color: var(--color-neutral-900);
    border-color: var(--color-neutral-900);
}

.btn--secondary:hover {
    background-color: var(--color-neutral-900);
    color: var(--color-white);
}

.btn--dark {
    background-color: var(--color-neutral-900);
    color: var(--color-white);
    border-color: var(--color-neutral-900);
}

.btn--dark:hover {
    background-color: var(--color-neutral-700);
    border-color: var(--color-neutral-700);
}

.btn--large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn--small {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn--full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* -----------------------------
   LINKS
   ----------------------------- */
.link {
    color: var(--color-primary-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link:hover {
    color: var(--color-primary-700);
}

.link--subtle {
    color: var(--color-neutral-600);
    text-decoration: none;
}

.link--subtle:hover {
    color: var(--color-neutral-900);
    text-decoration: underline;
}

/* -----------------------------
   BADGES
   ----------------------------- */
.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.badge--sale {
    background-color: var(--color-error);
    color: var(--color-white);
}

.badge--new {
    background-color: var(--color-neutral-900);
    color: var(--color-white);
}

.badge--sold-out {
    background-color: var(--color-neutral-500);
    color: var(--color-white);
}

/* -----------------------------
   FORM INPUTS
   ----------------------------- */
.input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border: var(--border-width) solid var(--border-color);
    background-color: var(--color-white);
    transition: border-color var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--color-neutral-900);
}

.input::placeholder {
    color: var(--color-neutral-400);
}

.input--error {
    border-color: var(--color-error);
}

.label {
    display: block;
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-2);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-error {
    font-size: var(--text-sm);
    color: var(--color-error);
    margin-top: var(--space-2);
}

/* -----------------------------
   UTILITIES
   ----------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }

.text-muted { color: var(--color-neutral-500); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none; }

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:flex { display: flex; }
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-neutral-200);
    margin-bottom: 2rem;
}

.admin-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: var(--color-neutral-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.admin-tab:hover {
    color: var(--color-neutral-900);
}

.admin-tab.is-active {
    color: var(--color-neutral-900);
    border-bottom-color: var(--color-neutral-900);
}

.admin-tab__badge {
    background: var(--color-neutral-900);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.discount-code {
    background: var(--color-neutral-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    background: white;
    border: 1px solid var(--color-neutral-200);
    border-radius: 8px;
    padding: 1.5rem;
}

.review-card--pending {
    border-left: 4px solid var(--color-warning, #f59e0b);
}

.review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-card__product a {
    font-weight: 600;
    color: var(--color-neutral-900);
}

.review-card__rating {
    display: flex;
    gap: 2px;
}

.review-card__meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-neutral-500);
    margin-bottom: 0.75rem;
}

.review-card__author {
    font-weight: 500;
}

.review-card__title {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.review-card__body {
    color: var(--color-neutral-700);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.review-card__actions {
    display: flex;
    gap: 0.5rem;
}

.review-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: var(--color-neutral-300);
    font-size: 1rem;
}

.star--filled {
    color: #f59e0b;
}

.product-detail__color {
    margin-bottom: 1.5rem;
}

.color-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.color-display__swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: inline-block;
    box-shadow: inset 0 0 0 2px #fff;
}

.color-display__name {
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

/* -----------------------------
   404 NOT FOUND
   ----------------------------- */
.not-found {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 4rem 1.5rem;
}

.not-found__content {
    max-width: 480px;
}

.not-found__code {
    font-family: var(--font-display);
    font-size: 8rem;
    line-height: 1;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.not-found__tagline {
    font-family: var(--font-accent);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.not-found__sub {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* -----------------------------
   COOKIE BANNER
   ----------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    color: #fff;
    padding: 1rem 0;
    z-index: 9999;
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-banner__text {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-banner__text a {
    color: #fff;
    text-decoration: underline;
}

.about-content__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -----------------------------
   FAQ PAGE
   ----------------------------- */
.faq-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.faq-page__title {
    margin-bottom: 0.5rem;
}

.faq-page__subtitle {
    color: #666;
    margin-bottom: 3rem;
}

.faq-page__subtitle a {
    text-decoration: underline;
}

.faq-section {
    margin-bottom: 2.5rem;
}

.faq-section__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
