/* Custom styles for Masha Global Link */

/* Category Cards */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease;
    margin-bottom: 0.75rem;
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-image {
    height: 120px;
    object-fit: contain;
}

/* New Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-minus, .quantity-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quantity-minus:hover, .quantity-plus:hover {
    background-color: #dbeafe;
}

.quantity-value {
    font-weight: bold;
    min-width: 1.5rem;
    text-align: center;
}

/* Add to cart button */
.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.2s;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
}

/* Cart Button */
.cart-btn {
    transition: transform 0.2s ease;
}

.cart-btn:hover {
    transform: scale(1.1);
}

/* Form Elements */
input:focus, select:focus, textarea:focus {
    border-color: #F71D06;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    overflow: hidden;
}

.quantity-btn {
    background-color: #f3f4f6;
    border: none;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: #e5e7eb;
}

.quantity-input {
    width: 3rem;
    border: none;
    text-align: center;
    font-size: 1rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #F71D06;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 50;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-1rem);
    transition: opacity 0.3s, transform 0.3s;
}

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

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #F71D06;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 90%;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 100;
}

/* Top header navigation styles */
.top-header-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.top-header-nav .icon {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.top-header-nav .text {
    font-size: 0.65rem;
    text-transform: uppercase;
    display: block;
}

.top-header-menu {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    .top-nav {
        display: none;
    }
    
    .top-header-menu {
        display: none;
    }
    
    /* Add padding to bottom of page content to prevent overlap with nav */
    body {
        padding-bottom: 4rem;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
    
    .top-nav {
        display: block;
    }
    
    .top-header-menu {
        display: flex;
    }
}

/* Navigation Items */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    color: #6b7280;
    font-size: 0.75rem;
}

.nav-item.active {
    color: #F71D06;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Utility Helpers */
.cursor-pointer {
    cursor: pointer;
}

.transition {
    transition: all 0.3s;
}

/* Top Navigation Bar */
.top-nav {
    display: none;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

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

.nav-brand {
    font-weight: bold;
    font-size: 1.25rem;
    color: #F71D06;
}

.top-nav-links {
    display: flex;
    gap: 1.5rem;
}

.top-nav-link {
    display: flex;
    align-items: center;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.top-nav-link:hover, 
.top-nav-link.active {
    color: #F71D06;
}

.top-nav-icon {
    margin-right: 0.5rem;
}