/* Beaute Lia Hair - Main Stylesheet */
:root {
    --primary-color: #d4a574;
    --secondary-color: #2c1810;
    --accent-color: #f4e4d6;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--secondary-color);
    color: var(--white) !important;
    padding: 8px 0;
    font-size: 0.875rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-right {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.header-main {
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 0.5rem;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-action {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.header-action:hover {
    background: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -9px);
}

/* for less padding on the header-main in mobile */
.header-main {
    padding: 0.5rem 0;
}


/* Slide-out Navigation Panel */


.slide-out-nav-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.slide-out-nav-panel.active {
    right: 0;
}

.slide-out-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mobile-search-section {
    display: none;
}

.mobile-user-section,
.mobile-search-section,
.mobile-navigation-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-user-section.reveal,
.mobile-search-section.reveal,
.mobile-navigation-section.reveal {
    opacity: 1;
    transform: translateY(0);
}

.mobile-welcome {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-quick-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-radius: 15px;
    margin-top: 10px;
}

.mobile-quick-action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-quick-action:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-quick-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error-color);
    color: var(--white);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid var(--white);
}

.mobile-nav-link,
.mobile-action-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-action-link:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

.mobile-nav-link i,
.mobile-action-link i {
    font-size: 1.2rem;
    width: 25px;
}

.mobile-search-section .search-bar {
    margin: 0;
    max-width: 100%;
}

.mobile-navigation-section {
    border-top: 2px solid var(--primary-color);
    padding-top: 20px;
}

.mobile-nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.desktop-only {
    display: flex;
}

/* Navigation */
.navbar {
    background: var(--accent-color);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-item.active .nav-link {
    background: var(--primary-color);
    color: var(--white);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-link:hover {
    background: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Hide mobile actions on desktop */
.product-card .product-mobile-actions {
    display: none;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
    margin-right: 0.5rem;
}

.rating-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    margin-right: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
}

.quantity-controls {
    display: flex;
    align-items: center;
    margin: 0 1rem;
}

.quantity-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px;
    margin: 0 0.5rem;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--primary-color);
    padding-top: 1rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {

    .navbar {
        display: none;
    }

    /* Mobile Product Cards */
    .product-card .product-info {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 1rem;
    }

    .product-card .product-details {
        flex: 1;
        min-width: 0; /* Allows text to wrap properly */
    }

    .product-card .product-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex-shrink: 0;
        align-items: center;
        position: relative;
        z-index: 10;
    }

    .mobile-action-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid var(--primary-color);
        background: var(--white);
        color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        position: relative;
        outline: none;
        user-select: none;
    }

    .mobile-action-btn i {
        pointer-events: none;
        z-index: 1;
        transition: inherit;
    }

    .mobile-action-btn:active {
        transform: scale(0.95);
    }

    .mobile-action-btn:hover {
        background: var(--primary-color);
        color: var(--white);
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .mobile-action-btn.cart-btn {
        border-color: var(--success-color);
        color: var(--success-color);
    }

    .mobile-action-btn.cart-btn:hover {
        background: var(--success-color);
        color: var(--white);
    }

    .mobile-action-btn.wishlist-btn {
        border-color: var(--error-color);
        color: var(--error-color);
    }

    .mobile-action-btn.wishlist-btn:hover {
        background: var(--error-color);
        color: var(--white);
    }

    .mobile-action-btn.wishlist-btn.in-wishlist {
        background: var(--error-color);
        color: var(--white);
        border-color: var(--error-color);
    }

    .mobile-action-btn.wishlist-btn.in-wishlist:hover {
        background: #dc2626;
        border-color: #dc2626;
    }

    /* Hide desktop product actions on mobile */
    .product-card .product-actions {
        display: none !important;
    }

    /* Hide desktop overlay actions on mobile */
    .product-card .product-actions-overlay {
        display: none !important;
    }

    /* Ensure product info text elements stay compact */
    .product-card .product-title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }

    .product-card .product-price {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .product-card .product-rating {
        margin-bottom: 0.5rem;
    }

    .product-card .product-category,
    .product-card .product-brand {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
        color: var(--text-light);
    }

    /* Mobile Header Top - only show left side */
    .header-top .container {
        justify-content: flex-start;
    }
    
    .header-top-left {
        display: flex;
        flex-direction: row;
        gap: 5px;
        justify-content: space-evenly;
        width: 100%;
    }

    .header-top-right {
        display: none; /* Hidden on mobile, moved to slide-out panel */
    }
    
    /* Mobile Header Main */
    .header-content {
        justify-content: space-between;
        align-items: center;
    }
    
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hide desktop search and actions on mobile */
    .desktop-only {
        display: none !important;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-image {
        margin: 0 0 1rem 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }
