/* Default Layout Styles */

/* Navbar spacing fix so the content does not go underneath it */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main {
    padding-top: 75px; /* Adjust based on your navbar height */
    min-height: calc(100vh - 120px);
}

/* Ensure content doesn't go under navbar */
body {
    padding-top: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main {
        padding-top: 100px; /* Slightly less padding on mobile */
    }
}

/* Stock management styles */
.add-to-cart-btn.disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.add-to-cart-btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.stock-info {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.stock-info.text-success {
    color: #198754 !important;
}

.stock-info.text-danger {
    color: #dc3545 !important;
}

/* Flash message styling */
.flash-messages-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    max-width: 500px;
    width: 90%;
}

.flash-messages-container .alert {
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    position: relative;
}

.flash-messages-container .alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-messages-container .alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.flash-messages-container .alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.flash-messages-container .alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.flash-messages-container .alert-primary {
    background: linear-gradient(135deg, #cce7ff, #b3d9ff);
    color: #004085;
    border-left: 4px solid #007bff;
}

/* Close button styling */
.flash-close-btn {
    transition: opacity 0.2s ease;
}

.flash-close-btn:hover {
    opacity: 1 !important;
}

/* Auto-hide flash messages */
.flash-messages-container .alert {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

