/* J&S Reserve - Custom Styles */
/* Modern heritage aesthetic with quiet confidence */

:root {
    --ink: #0B0D0E;           /* Primary text/marks */
    --ivory: #F8F5EF;         /* Backgrounds */
    --champagne: #C2A46B;     /* Accents, rules, rings */
    --slate: #2F3437;         /* Secondary text */
    
    /* Legacy variables mapped to new brand colors */
    --primary-color: var(--ink);
    --secondary-color: var(--slate);
    --accent-color: var(--champagne);
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --light-bg: var(--ivory);
    --dark-bg: var(--ink);
    --text-muted: var(--slate);
    --border-color: rgba(194, 164, 107, 0.2);
    --box-shadow: 0 0.125rem 0.25rem rgba(11, 13, 14, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(11, 13, 14, 0.15);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--ivory);
    letter-spacing: -0.01em;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Typography */
.fw-bold {
    font-weight: 600 !important;
}

.display-4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Navigation */
.navbar {
    padding: 1.5rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(11, 13, 14, 0.95) !important;
}

.navbar-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link:hover {
    color: var(--champagne) !important;
}

/* Cards */
.card {
    border: 1px solid rgba(194, 164, 107, 0.08);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 12px rgba(11, 13, 14, 0.04);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(11, 13, 14, 0.12);
    border-color: rgba(194, 164, 107, 0.2);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Product Cards */
.product-card {
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-8px);
}

.product-card .card-img-top-container {
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .card-img-top-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top-container img {
    transform: scale(1.05);
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.1);
}

/* Catalog card image styles for thumbnails */
.card-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.08);
    margin-bottom: 8px;
}

/* Consistent card title heights */
.card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em; /* roughly two lines */
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
}

/* Feature Boxes */
.feature-box {
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 500;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Stats Cards */
.stat-card {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    pointer-events: none;
}

.stat-icon {
    opacity: 0.3;
}

/* Forms */
.form-control, .form-select {
    border: 1px solid rgba(194, 164, 107, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background-color: rgba(248, 245, 239, 0.5);
}

.form-control:focus, .form-select:focus {
    border-color: var(--champagne);
    box-shadow: 0 0 0 0.125rem rgba(194, 164, 107, 0.2);
    background-color: var(--ivory);
}

.form-label {
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    border-left-color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background: rgba(243, 156, 18, 0.1);
    color: #d68910;
}

.alert-info {
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    color: #2e86ab;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    border: none;
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
    padding: 1rem;
}

.table tbody td {
    border-color: rgba(0,0,0,0.05);
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(44, 62, 80, 0.02);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

/* Workflow Steps */
.workflow-step {
    position: relative;
    padding: 2rem 1rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 25px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    z-index: -1;
}

.process-step:last-child::after {
    display: none;
}

/* Product Detail */
.product-image-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.product-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-content {
    line-height: 1.8;
}

.review-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.review-content p {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: var(--dark-bg) !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--champagne) !important;
}

/* Sticky Elements */
.sticky-top {
    z-index: 1020;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .product-card .card-img-top-container {
        height: 180px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .stat-card .card-body {
        padding: 1rem;
    }
    
    .process-step::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .feature-box {
        padding: 1.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer,
    .alert {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --text-muted: #666;
    }
    
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #1a1a1a !important;
    }
    
    .text-muted {
        color: #aaa !important;
    }
    
    .card {
        background-color: #2a2a2a;
        color: #fff;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
