/* ==============================
   GLOBAL VARIABLES & RESET
============================== */
:root {
    --primary-blue: #1E65A5;
    --primary-red: #E02A2A;
    --text-light: #ffffff;
    --text-dark: #333333;
    --dark-gray: #343a40;
    --light-gray: #f8f9fa;
    --bg-light: #f8f9fa;
    --border-light: #e0e0e0;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ==============================
   TOP BAR STYLES (ABOVE HEADER)
============================== */
.top-bar {
    background: var(--primary-red);
    color: var(--text-light);
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1001;
    width: 100%;
}

.top-bar .header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Left Side - Contact Info */
.top-bar-left {
    display: flex;
    align-items: center;
}

.contact-info-top {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.top-bar-link {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.top-bar-link:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.top-bar-link i {
    font-size: 0.9rem;
}

.top-bar-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.top-bar-text i {
    font-size: 0.9rem;
}

/* Right Side - Social Icons */
.top-bar-right {
    display: flex;
    align-items: center;
}

.social-icons-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon-top {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.social-icon-top:hover {
    background: var(--text-light);
    color: var(--primary-red);
    transform: translateY(-2px);
}

/* ==============================
   MAIN HEADER STYLES
============================== */
.main-header {
    background: var(--primary-blue);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 80px;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.logo img {
    height: 90px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: -10px 0;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.9;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    font-weight: 600;
}

/* Catalogue Button */
.catalogue-btn {
    background-color: var(--primary-red);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.catalogue-btn:hover {
    background-color: #c12727;
    transform: translateY(-2px);
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.login-btn {
    color: var(--text-light);
    border: 1px solid var(--text-light);
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

/* Shopping Cart */
.cart-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.cart-icon {
    position: relative;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
    z-index: 1002;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Close Button */
.mobile-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1004;
    transition: var(--transition);
}

.mobile-close-btn:hover {
    transform: scale(1.1);
    color: var(--primary-red);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* Prevent body scroll when menu open */
body.menu-open {
    overflow: hidden;
}

/* ==============================
   MOBILE RESPONSIVE STYLES
============================== */
/* Tablet & Mobile */
@media (max-width: 992px) {
    .header-content {
        gap: 10px;
        position: relative;
    }

    .logo {
        order: 1;
    }

    .logo img {
        height: 70px;
    }

    .menu-toggle {
        display: block;
        order: 2;
        margin-left: -80px;
    }

    .profile-section {
        order: 3;
        gap: 12px;
    }

    /* Mobile Close Button */
    .mobile-close-btn {
        display: block;
    }

    /* Sidebar Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-blue) 0%, #0d4a7a 100%);
        flex-direction: column;
        padding: 80px 20px 30px;
        transition: right 0.3s ease;
        z-index: 1003;
        overflow-y: auto;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        padding: 0;
        align-items: stretch;
        width: 100%;
    }

    .main-nav ul li {
        width: 100%;
    }

    .nav-link {
        color: white !important;
        display: block;
        width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        text-align: left;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }

    .nav-link.active {
        background: var(--primary-red);
        color: white !important;
    }

    .nav-link::after {
        display: none;
    }

    .catalogue-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 10px;
        padding: 12px 15px;
        background: var(--primary-red);
        border-radius: 8px;
    }

    .catalogue-btn:hover {
        background: #c12727;
        transform: translateY(-2px);
    }

    /* Profile section inside mobile menu */
    .main-nav .profile-section {
        display: none; /* Hide original profile section */
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Top bar stacking */
    .top-bar-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .contact-info-top {
        flex-direction: column;
        gap: 6px;
    }

    .top-bar-link span,
    .top-bar-text span {
        font-size: 0.8rem;
    }

    .social-icons-top {
        justify-content: center;
    }

    /* Header adjustments */
    .header-container {
        padding: 0 15px;
    }

    .main-header {
        height: 70px;
    }

    .logo img {
        height: 60px;
    }

    .main-nav {
        width: 280px;
        right: -280px;
    }

    /* Cart icon smaller */
    .cart-icon {
        font-size: 1.3rem;
    }

    .cart-count {
        font-size: 0.7rem;
        min-width: 16px;
        height: 16px;
    }

    .login-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .top-bar {
        font-size: 0.75rem;
        padding: 6px 0;
    }

    .contact-info-top {
        gap: 4px;
    }

    .top-bar-link i {
        font-size: 0.8rem;
    }

    .logo img {
        height: 50px;
    }

    .main-nav {
        width: 260px;
        right: -260px;
    }

    .menu-toggle {
        font-size: 1.3rem;
    }

    .profile-section {
        gap: 8px;
    }

    .login-btn {
        padding: 5px 10px;
        font-size: 0.85rem;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* ==============================
   FOOTER STYLES
============================== */
.main-footer {
    background: var(--primary-red);
    color: var(--text-light);
    padding: 25px 0 10px;
    margin-top: auto;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 15px;
}

/* Footer Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    margin-bottom: 8px;
}

.footer-logo img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 300px;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.social-icon:hover {
    background: var(--text-light);
    color: var(--primary-red);
    transform: translateY(-2px);
}

/* Footer Section Titles */
.footer-section {
    margin-bottom: 10px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-light);
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--text-light);
}

/* Footer Links - Unified Styling */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 10px;
}

.footer-links-list .footer-link,
.footer-links-list a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    display: inline-block;
}

.footer-links-list .footer-link:hover,
.footer-links-list a:hover {
    color: var(--text-light);
    transform: translateX(5px);
}

/* Direct links (for Privacy Policy, Terms, Login) */
.footer-link-direct {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 8px;
}

.footer-link-direct:hover {
    color: var(--text-light);
    transform: translateX(5px);
}

/* Contact Info Section */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-item i {
    color: var(--text-light);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

/* Address Row */
.address-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.address-block {
    flex: 1 1 calc(50% - 10px);
    display: flex;
    gap: 10px;
    min-width: 200px;
}

.address-block i {
    color: var(--text-light);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 1rem;
    width: 18px;
}

.address-content h4 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 3px;
    font-weight: 600;
}

.address-content p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-bottom: 0;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.legal-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.legal-link:hover {
    color: var(--text-light);
    text-decoration: underline;
}

/* ==============================
   FOOTER RESPONSIVE
============================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        align-items: center;
        text-align: center;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-links-list li {
        text-align: center;
    }
    
    .address-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .address-block {
        flex: 1 1 100%;
        justify-content: center;
        text-align: left;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer-logo img {
        height: 70px;
    }
    
    .footer-description {
        font-size: 0.85rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-link,
    .footer-link-direct,
    .contact-item {
        font-size: 0.85rem;
    }
    
    .legal-links {
        gap: 15px;
    }
}

/* Sidebar Overlay (used in app.blade.php) */
.sidebar-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active{
    opacity: 1;
    visibility: visible;
}