/* Custom Styles for The Pembina Pint and Restaurant */

/* Brand Colors */
:root {
    --brand-primary: #F4A460;
    --brand-dark: #8B4513;
    --brand-highlight: #facc15;
}

/* Smooth transitions - optimized for performance */
* {
    transition-property: color, background-color, border-color, transform, opacity, box-shadow;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-dark);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form validation styles */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-error {
    border-color: #dc2626 !important;
}

/* Success message */
.success-message {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

/* Modern Button Styles */
.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modern Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(244, 164, 96, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* Modern Card Styles */
.modern-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
}

/* Global Hero Styling */
.hero-brand-gradient {
    background: linear-gradient(115deg, var(--brand-dark) 0%, var(--brand-primary) 45%, var(--brand-highlight) 65%, var(--brand-dark) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-brand-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.25), transparent 55%);
    opacity: 0.6;
    pointer-events: none;
}

.hero-brand-gradient > * {
    position: relative;
    z-index: 1;
}

.hero-pill {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-pill:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Hero slider */
.hero-slider-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    background-color: #000;
}

.hero-slider {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 10s ease;
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    /* Optimized overlay: Reduced opacity to show more image while maintaining text readability */
    /* Darker overlay at edges, lighter in center for better visual balance */
    background: linear-gradient(115deg, 
        rgba(139,69,19,0.75) 0%, 
        rgba(244,164,96,0.65) 35%, 
        rgba(250,204,21,0.6) 50%, 
        rgba(244,164,96,0.65) 65%, 
        rgba(139,69,19,0.75) 100%);
    /* Additional dark overlay at bottom for better text contrast */
    box-shadow: inset 0 -100px 100px -50px rgba(0,0,0,0.3);
}

.hero-slide-content {
    position: relative;
    max-width: 1100px;
    padding: 40px 20px;
    text-align: left;
    color: #fff;
    z-index: 2;
}

.hero-slider-controls {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    pointer-events: none;
}

.hero-slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-slider-btn:hover {
    background-color: rgba(255,255,255,0.4);
}

.hero-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    transition: all 0.3s ease;
}

.hero-slider-dot.active {
    background-color: #F4A460;
    border-color: #F4A460;
    width: 32px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--brand-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Better spacing utilities */
.section-padding {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 2rem 0;
    }
    
    .hero-slide-content {
        text-align: center;
    }
    
    .hero-slider-controls {
        display: none;
    }
}

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

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Logo - Remove white background */
.logo-image {
    background: transparent !important;
    background-color: transparent !important;
    mix-blend-mode: normal;
    object-fit: contain;
}

/* Ensure logo container doesn't add background */
nav .flex.items-center a img {
    background: transparent !important;
    background-color: transparent !important;
}

/* Modern Add to Cart Button */
.add-to-cart-btn {
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Product card button container */
.product-card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 640px) {
    .add-to-cart-btn span {
        display: none;
    }
    
    .add-to-cart-btn {
        min-width: 40px;
        justify-content: center;
    }
}

/* Navigation Dropdown */
.menu-dropdown {
    position: relative;
}

.menu-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 50;
}

.menu-dropdown:hover .menu-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Account Dropdown */
.account-dropdown {
    position: relative;
}

.account-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 14rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 50;
}

.account-dropdown:hover .account-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

