/* ===================================
   Mariajuanita Guzman Art Shop
   Clean, Gallery-Style E-commerce
   =================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-text: #2C2C2C;
    --color-accent: #8B7355;
    --color-background: #FDFBF7;
    --color-gold: #D4AF37;
    --color-light: #F5F3EF;
    --color-muted: #6B6B6B;
    --color-white: #FFFFFF;
    --color-success: #2E7D32;

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --max-width: 1400px;
    --content-width: 1000px;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    --transition: 0.3s ease;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: var(--color-background);
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 4px 4px;
    text-decoration: none;
    font-size: 0.875rem;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: 2.5rem; margin-bottom: var(--spacing-sm); text-align: center; }
h3 { font-size: 1.25rem; }

p { margin-bottom: var(--spacing-sm); }

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

a:hover { color: var(--color-gold); }

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

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

.btn-buy {
    width: 100%;
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-buy:hover:not(:disabled) {
    background: var(--color-gold);
}

.btn-buy:disabled {
    background: var(--color-light);
    color: var(--color-muted);
    cursor: not-allowed;
}

/* ===================================
   Header
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-light);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text);
    letter-spacing: 0.05em;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.nav {
    display: flex;
    gap: var(--spacing-md);
}

.nav a {
    font-size: 0.875rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

/* ===================================
   Hero
   =================================== */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--spacing-xl) + 60px) var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(180deg, var(--color-light) 0%, var(--color-background) 100%);
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--color-muted);
    margin-bottom: var(--spacing-md);
}

/* ===================================
   Foundation Banner
   =================================== */
.foundation-banner {
    background: var(--color-text);
    color: var(--color-white);
    padding: var(--spacing-sm) 0;
    text-align: center;
}

.foundation-banner p {
    margin: 0;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.foundation-banner a {
    color: var(--color-gold);
}

/* ===================================
   Shop Section
   =================================== */
.shop {
    padding: var(--spacing-xl) 0;
}

.section-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

.section-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(139, 115, 85, 0.08);
    border-radius: 4px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.filter-tab {
    padding: 0.5rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    background: transparent;
    border: 1px solid var(--color-light);
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--color-text);
    color: var(--color-white);
    border-color: var(--color-text);
}

/* Art Grid - Masonry layout for natural aspect ratios */
.art-grid {
    column-count: 3;
    column-gap: var(--spacing-md);
}

.art-item {
    background: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
    break-inside: avoid;
    margin-bottom: var(--spacing-md);
}

.art-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.art-image {
    position: relative;
    overflow: hidden;
}

.art-image a {
    display: block;
}

.art-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition);
}

.art-item:hover .art-image img {
    transform: scale(1.05);
}

.art-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-light) 0%, #E8E4DE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-style: italic;
}

.art-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    padding: 0.25rem 0.75rem;
    background: var(--color-text);
    color: var(--color-white);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 2px;
}

.art-badge.badge-print {
    background: var(--color-accent);
}

.art-info {
    padding: var(--spacing-sm);
}

.art-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.art-medium,
.art-dimensions {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
}

.art-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
    margin: var(--spacing-sm) 0;
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(
        180deg,
        var(--color-light) 0%,
        var(--color-background) 100%
    );
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    max-width: var(--content-width);
    margin: 0 auto;
}

.about-text h2 {
    text-align: left;
    margin-bottom: var(--spacing-md);
    position: relative;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--color-gold);
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
}

.about-text p:first-of-type {
    font-size: 1.25rem;
    color: var(--color-text);
}

.about-text p em {
    color: var(--color-accent);
    font-style: italic;
}

/* Elegant framed portrait container */
.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-photo-frame {
    position: relative;
    padding: 12px;
    background: linear-gradient(145deg, #fff 0%, #f8f8f6 100%);
    border-radius: 4px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 12px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-photo-frame:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.about-photo-frame::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 2px;
    pointer-events: none;
}

.about-photo {
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-background) 0%, #E8E4DE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-style: italic;
}

/* Origin story - the meaning of "Viajes" */
.about-origin {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-gold);
    text-align: center;
}

.about-origin p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-muted);
    line-height: 1.8;
    margin: 0;
}

.about-origin em {
    color: var(--color-accent);
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ===================================
   How It Works
   =================================== */
.how-it-works {
    padding: var(--spacing-xl) 0;
}

.how-it-works h2 {
    margin-bottom: var(--spacing-lg);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    max-width: var(--content-width);
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--color-text);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.875rem;
    color: var(--color-muted);
}

/* ===================================
   Contact
   =================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--color-light);
    text-align: center;
}

.contact p {
    color: var(--color-muted);
}

.contact-email {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--color-text);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    width: 80px;
    height: auto;
    margin-bottom: var(--spacing-sm);
    border-radius: 6px;
}

.footer-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* ===================================
   Lightbox
   =================================== */
.mj-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mj-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.mj-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(8px);
}

.mj-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mj-lightbox-content.slide-left {
    transform: translateX(-30px);
    opacity: 0;
}

.mj-lightbox-content.slide-right {
    transform: translateX(30px);
    opacity: 0;
}

.mj-lightbox-content.slide-in-left {
    animation: slideInLeft 0.3s ease forwards;
}

.mj-lightbox-content.slide-in-right {
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInLeft {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.mj-lightbox-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(145deg, #fff 0%, #f8f8f6 100%);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}

.mj-lightbox-image {
    max-width: calc(90vw - 48px);
    max-height: calc(80vh - 100px);
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.mj-lightbox-info {
    text-align: center;
    padding: var(--spacing-md) 0 0;
    color: var(--color-background);
}

.mj-lightbox-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 0.25rem;
    letter-spacing: 0.03em;
}

.mj-lightbox-medium {
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(253, 251, 247, 0.7);
    margin: 0 0 0.5rem;
}

.mj-lightbox-counter {
    font-size: 0.8rem;
    color: rgba(253, 251, 247, 0.5);
    margin: 0;
}

.mj-lightbox-close,
.mj-lightbox-prev,
.mj-lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: rgba(253, 251, 247, 0.8);
    cursor: pointer;
    padding: 12px;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.mj-lightbox-close:hover,
.mj-lightbox-prev:hover,
.mj-lightbox-next:hover {
    color: var(--color-gold);
    transform: scale(1.1);
}

.mj-lightbox-close {
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
}

.mj-lightbox-close svg {
    width: 24px;
    height: 24px;
}

.mj-lightbox-prev,
.mj-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

.mj-lightbox-prev:hover,
.mj-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.mj-lightbox-prev {
    left: 20px;
}

.mj-lightbox-next {
    right: 20px;
}

.mj-lightbox-prev svg,
.mj-lightbox-next svg {
    width: 32px;
    height: 32px;
}

/* ===================================
   Responsive
   =================================== */

/* Tablet */
@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
        margin-bottom: var(--spacing-md);
    }

    .about-photo-frame {
        max-width: 320px;
    }

    .about-photo {
        max-width: 100%;
    }

    .about-text h2 {
        text-align: center;
    }

    .about-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-text p {
        text-align: left;
    }

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

    .art-grid {
        column-count: 2;
    }
}

/* Large Phone / Small Tablet */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .header {
        position: relative;
        padding: var(--spacing-sm) 0;
    }

    .header .container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .logo-name {
        font-size: 1.25rem;
    }

    .nav {
        gap: var(--spacing-sm);
    }

    .nav a {
        font-size: 0.75rem;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero-lead {
        font-size: 1rem;
    }

    .art-grid {
        column-count: 2;
    }

    .art-item:hover {
        transform: none;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-photo-frame {
        max-width: 280px;
        padding: 10px;
    }

    .about-photo-frame:hover {
        transform: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }

    /* Lightbox mobile */
    .mj-lightbox-prev,
    .mj-lightbox-next {
        width: 44px;
        height: 44px;
        padding: 8px;
    }

    .mj-lightbox-prev {
        left: 8px;
    }

    .mj-lightbox-next {
        right: 8px;
    }

    .mj-lightbox-prev svg,
    .mj-lightbox-next svg {
        width: 24px;
        height: 24px;
    }

    .mj-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .mj-lightbox-image-wrap {
        padding: 8px;
    }

    .mj-lightbox-image {
        max-width: calc(100vw - 32px);
        max-height: calc(70vh - 80px);
    }

    .mj-lightbox-title {
        font-size: 1.25rem;
    }
}

/* Phone */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.8rem;
    }

    .foundation-banner p {
        font-size: 0.75rem;
    }

    .art-grid {
        column-count: 1;
    }

    .art-info {
        padding: var(--spacing-sm);
    }

    .art-title {
        font-size: 1rem;
    }

    .art-price {
        font-size: 1.25rem;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }

    /* Lightbox small phone */
    .mj-lightbox-prev,
    .mj-lightbox-next {
        top: auto;
        bottom: 100px;
        transform: none;
    }

    .mj-lightbox-prev:hover,
    .mj-lightbox-next:hover {
        transform: none;
    }

    .mj-lightbox-image {
        max-height: 60vh;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .art-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .art-item:hover .art-image img {
        transform: none;
    }

    .art-item:active {
        transform: scale(0.98);
    }

    .btn:hover {
        transform: none;
    }

    .about-photo-frame:hover {
        transform: none;
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.08),
            0 12px 40px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}
