/* NICOTA WINES - GLOBAL STYLES */

/* Color Variables */
:root {
    --wine-red: #8B0000;
    --gold: #DAA520;
    --dark-bg: #1A1A1A;
    --light-bg: #F8F8F8;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #E5E5E5;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: #FFFFFF;
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 0; /* No padding on desktop */
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 2rem;
}

.nav-logo {
    flex-shrink: 0;
}

.nav-logo img {
    height: 70px;
    width: auto;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.938rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--wine-red);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wine-red);
}

/* Search Bar in Nav */
.nav-search {
    position: relative;
    width: 250px;
}

.nav-search input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--wine-red);
}

.nav-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-dropdown {
    position: relative;
}

.user-icon-btn {
    background: none;
    border: 2px solid var(--wine-red);
    color: var(--wine-red);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.user-icon-btn:hover {
    background: var(--wine-red);
    color: white;
}

.user-dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    display: none;
    z-index: 100;
}

.user-dropdown-menu.show {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.938rem;
}

.user-dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--wine-red);
}

.user-dropdown-menu a i {
    margin-right: 0.5rem;
    width: 20px;
}

.cart-icon {
    position: relative;
    font-size: 1.625rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.cart-icon:hover {
    color: var(--wine-red);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--wine-red);
    color: white;
    font-size: 0.7rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    font-size: 0.938rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--wine-red) 0%, var(--gold) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139,0,0,0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--wine-red);
}

/* Section Styles */
.section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: #CCCCCC;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-section h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.938rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--gold);
    text-decoration: none;
}

/* Quick View Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--wine-red);
    color: white;
    border-color: var(--wine-red);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--wine-red) 0%, var(--gold) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-wine-bottle {
    width: 80px;
    height: 300px;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    position: relative;
}

.modal-wine-bottle::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
}

.modal-product-flag {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3rem;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-badge {
    display: inline-block;
    background: var(--gold);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.813rem;
    font-weight: 600;
    width: fit-content;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-origin {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.modal-rating {
    color: var(--gold);
    font-size: 1rem;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--wine-red);
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.938rem;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-info-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-info-value {
    font-weight: 600;
    color: var(--text-primary);
}

.modal-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-label {
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background: #F0F0F0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: var(--wine-red);
    color: white;
}

.quantity-value {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.btn-modal-cart {
    flex: 1;
    padding: 1rem;
    background: linear-gradient(135deg, var(--wine-red) 0%, var(--gold) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-modal-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139,0,0,0.3);
}

.btn-favorite {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid var(--wine-red);
    border-radius: 8px;
    color: var(--wine-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-favorite:hover,
.btn-favorite.active {
    background: var(--wine-red);
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle,
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--wine-red);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-left {
    display: none;
}

/* Mobile Search Overlay - Hidden on Desktop */
.mobile-search-overlay {
    display: none;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-menu-overlay.show {
    display: block;
}

.mobile-menu-content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--wine-red), var(--gold));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-links li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-menu-links a:hover {
    background: var(--light-bg);
    color: var(--wine-red);
}

.mobile-menu-links a i {
    width: 20px;
    text-align: center;
    color: var(--wine-red);
}

/* Responsive Design - Microsoft.com inspired */
@media (max-width: 968px) {
    body {
        padding-top: 70px;
    }

    .nav-container {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    .nav-logo img {
        height: 50px;
    }

    .nav-center {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .nav-left {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 350px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-modal-cart,
    .btn-favorite {
        width: 100%;
    }
}

/* Mobile Optimized Layout (640px and below) */
@media (max-width: 640px) {
    body {
        padding-top: 0;
    }

    /* Mobile Navigation: Hamburger+Search Left | Logo Center | User+Cart Right */
    .navbar {
        min-height: 80px;
    }

    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        min-height: 80px;
    }

    .nav-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        justify-self: start;
        margin-left: -0.5rem;
    }

    .nav-actions {
        margin-right: -0.5rem;
    }

    .mobile-menu-toggle,
    .mobile-search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
        padding: 0;
    }

    .nav-actions {
        margin-right: -0.5rem;
    }

    .nav-logo {
        justify-self: center;
        text-align: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-logo img {
        height: 70px;
    }

    .nav-center,
    .nav-search {
        display: none;
    }

    .nav-actions {
        justify-self: end;
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .user-icon-btn,
    .cart-icon {
        font-size: 1.125rem;
        padding: 0.375rem;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.625rem;
        top: -2px;
        right: -2px;
    }

    /* Mobile Search Overlay */
    .mobile-search-overlay {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .mobile-search-overlay.show {
        display: block;
    }

    .mobile-search-overlay input {
        width: 100%;
        padding: 0.875rem;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
    }

    .mobile-search-overlay input:focus {
        border-color: var(--wine-red);
        outline: none;
    }

    /* Section Spacing */
    .section {
        padding: 2.5rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* Typography */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.938rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    /* User Dropdown */
    .user-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 180px;
    }

    /* Mobile Footer Minimized */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-logo {
        display: none;
    }

    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-section p {
        font-size: 0.813rem;
        line-height: 1.4;
    }

    .footer-links a {
        font-size: 0.813rem;
    }

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    .footer-bottom {
        padding-top: 1rem;
        font-size: 0.75rem;
    }

    /* Product Slider - 2 cards visible on mobile (not hero slider) */
    .productSwiper .swiper-slide {
        width: calc(50% - 0.5rem) !important;
    }
}

/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B0000, #DAA520);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
}

.chatbot-button i {
    font-size: 1.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.chatbot-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 4rem);
    height: 500px;
    max-height: calc(100vh - 10rem);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.show {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #8B0000, #DAA520);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chatbot-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #F8F8F8;
}

.chat-message {
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message p {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin: 0;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
}

.chat-message.user p {
    background: #8B0000;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-message.bot p {
    background: white;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-message.bot p a {
    color: #8B0000;
    text-decoration: underline;
    font-weight: 600;
}

.chat-message.bot p a:hover {
    color: #DAA520;
}

.chatbot-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-top: 1px solid #E5E5E5;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    outline: none;
    font-size: 0.875rem;
}

.chat-input:focus {
    border-color: #8B0000;
}

.btn-sm {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-social a {
    color: #999;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: var(--wine-red);
    transform: translateY(-3px);
}

/* Mobile Chatbot */
@media (max-width: 640px) {
    .chatbot-widget {
        bottom: 1rem;
        right: 1rem;
    }
    
    .chatbot-button {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-button i {
        font-size: 1.5rem;
    }
    
    .chatbot-window {
        position: fixed !important;
        bottom: 4.5rem !important;
        right: 0.5rem !important;
        left: 0.5rem !important;
        width: auto !important;
        max-width: calc(100vw - 1rem) !important;
        height: 450px !important;
        max-height: calc(100vh - 7rem) !important;
    }
    
    .chatbot-header {
        padding: 0.875rem 1rem;
        font-size: 0.938rem;
    }
    
    .chatbot-messages {
        padding: 0.75rem;
    }
    
    .chat-message p {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .chatbot-input-area {
        padding: 0.75rem;
    }
}