/* Ulttyq Market - Base Styles */

/*
 * NOTE: Gilroy is a commercial font requiring a license.
 * If you have a licensed copy, host it locally or use a CDN like:
 * @import url('https://fonts.cdnfonts.com/css/gilroy-bold');
 *
 * For now, using system font fallback as specified.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream-bg: #F8F4E3;
    --primary-green: #3BB54A;
    --dark-green: #155229;
}

body {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-green);
    background: var(--cream-bg);
    font-size: 16px; /* Prevents iOS auto-zoom on form inputs */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--dark-green);
    color: white;
    padding: 1.25rem 0;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
}

header h1 a {
    color: white;
    text-decoration: none;
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

main {
    min-height: calc(100vh - 200px);
}

footer {
    background: var(--dark-green);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Utility classes - will expand in Phase B and C */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-green);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--dark-green);
}

/* Language Selector Styling */
#lang-selector,
#hero-lang-selector {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25em;
    padding-right: 2.5rem;
}

#lang-selector:hover,
#hero-lang-selector:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#lang-selector option,
#hero-lang-selector option {
    background: var(--dark-green);
    color: white;
    padding: 0.5rem;
}

/* Focus state for accessibility */
#lang-selector:focus,
#hero-lang-selector:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    min-width: 300px;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Toast Types */
.toast-success {
    border-left-color: var(--primary-green);
}

.toast-success .toast-icon {
    background: rgba(59, 181, 74, 0.1);
    color: var(--primary-green);
}

.toast-error {
    border-left-color: #ff4444;
}

.toast-error .toast-icon {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-warning .toast-icon {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.toast-info {
    border-left-color: #2196f3;
}

.toast-info .toast-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

/* Mobile Navigation */
.nav-links {
    align-items: center;
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .nav-content {
        flex-wrap: wrap;
    }

    header h1 a img {
        height: 50px !important; /* Smaller logo on mobile */
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.875rem;
    }

    .nav-links li {
        flex-shrink: 0;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Hide "Track Order" text on very small screens, show icon */
    #lang-selector {
        font-size: 0.875rem;
        padding: 0.5rem 2rem 0.5rem 0.5rem;
    }

    /* Ensure cart link is always visible and tappable */
    #cart-link {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    #cart-badge {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.7rem !important;
        line-height: 20px !important;
    }

    /* Container padding */
    .container {
        padding: 0 1rem;
    }

    /* Buttons - ensure minimum touch target size */
    .btn,
    button {
        min-height: 44px;
        min-width: 44px;
        font-size: 1rem;
    }

    /* Form inputs - minimum 16px to prevent iOS zoom */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Toast notifications */
    .toast-container {
        right: 10px;
        left: 10px;
        top: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
    }

    /* Cart sidebar - full width on mobile */
    #cart-sidebar {
        width: 100%;
        right: -100%;
    }
}
