/* ============================================
   GATRAVERSA - Premium Batik Heritage
   Theme: Black, Gray, Gold, Silver
   Elements: Ocean, Wood, Turtle, Shell, Fish
   ============================================ */

/* CSS Variables */
:root {
    /* Primary Colors - Gold/Silver Theme */
    --g-gold: #d4af37;
    --g-gold-hover: #b5952f;
    --g-gold-light: #f1d592;
    --g-silver: #c0c0c0;
    --g-silver-dark: #a0a0a0;
    --g-dark: #1a1a1a;
    --g-dark-lighter: #222222;
    --g-gray-bg: #f5f5f5;
    --g-gray-dark: #131313;
    
    /* Surface Colors */
    --surface: #131313;
    --surface-dim: #131313;
    --surface-bright: #393939;
    --surface-container: #1f2020;
    --surface-container-low: #1b1c1c;
    --surface-container-high: #2a2a2a;
    --surface-container-highest: #353535;
    
    /* Text Colors */
    --on-surface: #e4e2e1;
    --on-surface-variant: #c4c7c7;
    --primary: #c8c6c5;
    --secondary: #e9c349;
    --outline: #8e9192;
    --outline-variant: #444748;
    
    /* Ocean Elements */
    --ocean-deep: #0a1628;
    --ocean-blue: #1e3a5f;
    --ocean-teal: #2c5f6f;
    --sand-gold: #d4af37;
    --coral-soft: #c9a86c;
    
    /* Typography */
    --font-serif: 'Noto Serif', Georgia, serif;
    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}

.font-serif {
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

.text-gold {
    color: var(--g-gold);
}

.text-silver {
    color: var(--g-silver);
}

/* ============================================
   HERITAGE DECORATIVE ELEMENTS
   ============================================ */

/* Heritage Divider */
.heritage-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 4rem 0;
}

.heritage-divider::before,
.heritage-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--outline-variant), transparent);
}

.heritage-divider-icon {
    width: 10px;
    height: 10px;
    background: var(--g-gold);
    transform: rotate(45deg);
    margin: 0 16px;
    position: relative;
}

.heritage-divider-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border: 1px solid var(--g-gold);
    transform: rotate(0deg);
    opacity: 0.5;
}

/* Ocean Wave Divider */
.wave-divider {
    position: relative;
    height: 60px;
    overflow: hidden;
    margin: 2rem 0;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
}

/* Turtle Decorative Element */
.turtle-decoration {
    position: fixed;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.turtle-decoration.top-left {
    top: 100px;
    left: -50px;
    width: 200px;
}

.turtle-decoration.bottom-right {
    bottom: 100px;
    right: -50px;
    width: 200px;
    transform: rotate(180deg);
}

/* Shell Pattern Background */
.shell-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L50 20 L50 40 L30 55 L10 40 L10 20 Z' fill='none' stroke='%23d4af37' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E");
}

/* Wood Texture Overlay */
.wood-texture {
    position: relative;
}

.wood-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(212, 175, 55, 0.02) 2px,
        rgba(212, 175, 55, 0.02) 4px
    );
    pointer-events: none;
}

/* Fish Swimming Animation */
@keyframes swim {
    0% {
        transform: translateX(-100%) translateY(0);
    }
    25% {
        transform: translateX(25%) translateY(-10px);
    }
    50% {
        transform: translateX(50%) translateY(0);
    }
    75% {
        transform: translateX(75%) translateY(10px);
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(0);
    }
}

.fish-decoration {
    position: fixed;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    animation: swim 20s linear infinite;
}

.fish-decoration:nth-child(2) {
    animation-delay: -5s;
    top: 30%;
}

.fish-decoration:nth-child(3) {
    animation-delay: -10s;
    top: 60%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--g-gold) 0%, var(--g-gold-light) 50%, var(--g-gold) 100%);
    color: var(--g-dark);
    border-radius: 0.125rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--g-gold-hover) 0%, var(--g-gold) 50%, var(--g-gold-hover) 100%);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--on-surface);
    border: 1px solid var(--outline);
    border-radius: 0.125rem;
}

.btn-secondary:hover {
    border-color: var(--g-gold);
    color: var(--g-gold);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border-radius: 0.125rem;
}

.btn-whatsapp:hover {
    background: #128C7E;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 0.25rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--g-gold);
    box-shadow: 0 10px 40px -10px rgba(212, 175, 55, 0.1);
}

.card-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface-container-high);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ============================================
   MODAL / POPUP
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 0.25rem;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--on-surface);
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--g-gold);
    color: var(--g-dark);
}

/* Gallery Slider */
.modal-gallery {
    flex: 1;
    background: var(--surface-container-high);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    overflow: hidden;
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--g-dark);
    transition: all 0.3s ease;
}

.gallery-nav:hover {
    background: var(--g-gold);
}

.gallery-nav.prev { left: 1rem; }
.gallery-nav.next { right: 1rem; }

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--g-gold);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Form */
.modal-form {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-height: 90vh;
}

/* ============================================
   VARIATION SELECTORS
   ============================================ */
.variation-group {
    margin-bottom: 1.5rem;
}

.variation-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--outline);
    margin-bottom: 0.75rem;
    display: block;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variation-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--outline-variant);
    background: transparent;
    color: var(--on-surface);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variation-btn:hover,
.variation-btn.active {
    border-color: var(--g-gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--g-gold);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--outline);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--outline-variant);
    padding: 0.75rem 0;
    color: var(--on-surface);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--g-gold);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid #25D366;
    color: #25D366;
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid #ff3b30;
    color: #ff3b30;
}

.alert-warning {
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid #ffcc00;
    color: #ffcc00;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0.125rem;
}

.badge-gold {
    background: linear-gradient(135deg, var(--g-gold), var(--g-gold-hover));
    color: var(--g-dark);
}

.badge-outline {
    border: 1px solid var(--g-gold);
    color: var(--g-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--g-dark);
    border-bottom: 1px solid rgba(192, 192, 192, 0.2);
}

.nav-link {
    color: var(--g-silver);
    text-decoration: none;
    font-family: var(--font-serif);
    font-weight: 300;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--g-gold);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--g-gold);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--g-dark);
    border-top: 1px solid rgba(192, 192, 192, 0.2);
    padding: 4rem 0;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.gold-gradient-text {
    background: linear-gradient(135deg, var(--g-gold) 0%, var(--g-gold-light) 50%, var(--g-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.silver-text {
    color: var(--g-silver);
}

.ambient-glow {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */
.admin-sidebar {
    background: var(--surface-container);
    border-right: 1px solid var(--outline-variant);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
}

.admin-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    background: var(--surface);
}

.admin-card {
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 0.25rem;
    padding: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--outline-variant);
}

.admin-table th {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--outline);
}

.admin-table tr:hover td {
    background: var(--surface-container-high);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
    }
    
    .gallery-nav {
        display: none;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
}

/* Print styles */
@media print {
    .main-nav,
    .main-footer,
    .btn {
        display: none !important;
    }
}
