/* Arte Collettiva - Ultra Professional Gallery Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Palette Premium Gallery */
    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;
    --primary: #1a1a1a;
    /* Almost Black */
    --secondary: #3b82f6;
    /* Accent Blue */
    --accent-gold: #c5a47e;
    /* Gold for artistic touches */
    --text-main: #2d2d2d;
    --text-light: #6c757d;
    --border: #e9ecef;

    /* Spacing & Effects */
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 60px -10px rgba(0, 0, 0, 0.12);
    --glass: rgba(255, 255, 255, 0.85);
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-top: 0;
    line-height: 1.2;
}

/* --- Navbar (Glassmorphism & Smart Scroll) --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    padding: 0.8rem 0;
    transition: transform 0.3s ease, background 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    padding: 0.6rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo:hover .logo-img {
    transform: rotate(15deg) scale(1.1);
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary) 30%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Hamburger - Hidden on Desktop */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.3s linear;
    transform-origin: 1px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* --- Hero Section --- */
.ac-hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    background-image: linear-gradient(135deg, rgba(10, 25, 47, 0.95) 0%, rgba(20, 50, 80, 0.85) 50%, rgba(10, 25, 47, 0.9) 100%), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    overflow: hidden;
    margin-top: -70px;
    /* Counteract main-content-wrapper margin */
    padding-top: 70px;
}

.ac-hero-content {
    max-width: 600px;
    z-index: 2;
    animation: fadeRight 1s ease-out;
}

.ac-hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
    font-family: 'Inter', sans-serif;
    letter-spacing: -2px;
}

.text-gradient {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ac-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-weight: 300;
}

.ac-hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.ac-btn-hero {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.ac-btn-hero.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.ac-btn-hero.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6);
}

.ac-btn-hero.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.ac-btn-hero.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.ac-hero-stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.ac-stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Visual Elements */
.ac-hero-visual {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ac-floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
    animation-delay: 0s;
}

.card-2 {
    width: 180px;
    height: 180px;
    top: 40%;
    right: 10%;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(78, 205, 196, 0.1));
    animation-delay: 2s;
    font-size: 3.5rem;
}

.card-3 {
    width: 100px;
    height: 100px;
    bottom: 15%;
    left: 20%;
    background: linear-gradient(135deg, rgba(255, 230, 109, 0.2), rgba(255, 230, 109, 0.1));
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 992px) {
    .ac-hero-section {
        flex-direction: column;
        text-align: center;
        padding: 120px 20px 60px;
        justify-content: center;
    }

    .ac-hero-content {
        margin-bottom: 4rem;
    }

    .ac-hero-title {
        font-size: 3rem;
    }

    .ac-hero-actions {
        justify-content: center;
    }

    .ac-hero-stats {
        justify-content: center;
    }

    .ac-hero-visual {
        display: none;
        /* Hide visual on mobile to save space */
    }
}

/* --- Main Layout --- */
.main-content-wrapper {
    margin-top: 70px;
    padding: 0;
    display: block;
    min-height: calc(100vh - 70px - 100px);
    width: 100%;
    overflow-x: hidden;
}

/* --- Compact Toolbar Header --- */
.ac-toolbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 0.5rem 1.5rem;
    /* Compact padding */
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    /* Pull canvas closer to header */
    gap: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
    /* Allow wrap on very small screens */
    position: relative;
    z-index: 20;
}

.ac-toolbar-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    white-space: nowrap;
}

.ac-toolbar-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: var(--bg-body);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.ac-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
}

.ac-stat-item i {
    color: var(--secondary);
}

.ac-toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

.button-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.button-success {
    background: #10b981 !important;
    color: white !important;
    border: none;
}

/* Mobile Tweaks for Toolbar */
@media (max-width: 768px) {
    .ac-toolbar-header {
        padding: 1rem;
        border-radius: 16px;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .ac-toolbar-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .ac-toolbar-stats,
    .ac-toolbar-actions {
        width: 100%;
        justify-content: center;
    }
}

/* --- The STAGE (Grid Container) --- */
.ac-grid-container {
    position: relative;
    width: 100vw;
    background: #eef2f6;
    padding: 1rem 0 3rem 0;
    /* Reduced top padding to 1rem */
    margin: 0;
    /* Reset margin since wrapper has no padding now */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    min-height: 60vh;
    /* Ensure sensible min height */
}

/* The Canvas - The Star of the Show */
#ac-painting-canvas {
    background: white;
    /* Elegant Shadow to lift it off the page */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 10px solid white;
    /* Passe-partout effect */
    cursor: crosshair;

    /* Responsive Square Logic */
    width: auto;
    height: auto;

    /* Constraints */
    max-height: 80vh;
    /* Occupy most of the height */
    max-width: 90vw;
    /* Occupy most of the width */

    aspect-ratio: 1 / 1;

    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

#ac-painting-canvas:hover {
    /* No transform to avoid grid misalignment */
    cursor: crosshair;
}

/* Controls (Floating) */
.ac-grid-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    z-index: 10;
}

.button {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.button-primary,
.mode-active {
    background: var(--primary);
    color: white;
}

.button-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
}

#ac-approve-all {
    background: #10b981;
    color: white;
}

/* Modals (Glass) */
.ac-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
}

.ac-modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.ac-modal-content h3 {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Forms */
.ac-form-group {
    margin-bottom: 1.2rem;
}

.ac-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ac-form-group input,
.ac-form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-body);
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.ac-form-group input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

/* Magnifier */
#ac-magnifier {
    border: 4px solid white !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

/* Animations */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Footer (Modern) --- */
.site-footer {
    background-color: white;
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.site-footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Mobile Tweak */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
        /* Show hamburger on mobile */
    }

    /* Hamburger Animation State */
    .hamburger-menu.active span:first-child {
        transform: rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .nav-links {
        display: none;
        /* Hide default nav on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 2rem;
        align-items: center;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
        animation: slideDown 0.3s ease-out;
    }

    /* Adjust animations */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .ac-painting-header h2 {
        font-size: 2.5rem;
    }

    .ac-grid-container {
        padding: 1rem 0;
    }

    #ac-painting-canvas {
        width: 95vw;
        max-height: 60vh;
    }
}

/* ============================================
   LOADING SPINNER OVERLAY
   Beautiful animated spinner for cart actions
   ============================================ */
.ac-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-loading-spinner-wrapper {
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ac-loading-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.ac-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    animation: spinnerRotate 1.5s linear infinite;
}

.ac-spinner-ring:nth-child(1) {
    border-top-color: #3b82f6;
    animation-delay: 0s;
}

.ac-spinner-ring:nth-child(2) {
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    border-top-color: #c5a47e;
    animation-delay: 0.15s;
    animation-direction: reverse;
}

.ac-spinner-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-top-color: #ffffff;
    animation-delay: 0.3s;
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ac-loading-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #c5a47e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

.ac-loading-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite 0.5s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}