/* Custom CSS for Fresh Juice Co. */

:root {
    --primary-color: #28a745;
    --secondary-color: #ffc107;
    --accent-color: #fd7e14;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #495057;
    --border-radius: 10px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.8rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 12px 30px;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-warning {
    background: linear-gradient(45deg, var(--secondary-color), #ff8c00);
    border: none;
    box-shadow: var(--box-shadow);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.4);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-success {
    background: linear-gradient(45deg, var(--primary-color), #20c997);
    border: none;
    box-shadow: var(--box-shadow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.4);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.feature-card i {
    transition: var(--transition);
}

.feature-card:hover i {
    transform: scale(1.1);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image i {
    font-size: 4rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.product-card:hover .product-image i {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-description {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}


/* Add to cart button enhancement */
.add-to-cart-btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    border-radius: 12px;
    transition: var(--transition);
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-item-image i {
    font-size: 1.5rem;
}

.cart-item-info {
    flex: 1;
    margin-right: 1rem;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.cart-item-price {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Cart Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-label-cart {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

.quantity-controls-cart {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.quantity-controls-cart:hover {
    border-color: var(--primary-color);
    background: rgba(40, 167, 69, 0.05);
}

.quantity-btn-cart {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
}

.quantity-btn-cart:hover {
    background: #218838;
    transform: scale(1.1);
}

.quantity-btn-cart:active {
    transform: scale(0.95);
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.item-total-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.cart-item-remove:active {
    transform: scale(0.95);
}

/* Stats */
.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Contact Form */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #495057 100%);
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer h5, footer h6 {
    color: white !important;
    font-weight: 600;
}

footer .list-unstyled a {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition);
}

footer .list-unstyled a:hover {
    color: var(--primary-color) !important;
}

footer .list-unstyled li {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

footer .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 2rem;
    }
    
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-lg {
        width: 100%;
    }
}

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

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

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1050;
    transform: translateX(400px);
    transition: var(--transition);
}

.notification.show {
    transform: translateX(0);
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #218838;
    transform: translateY(-3px);
}

.scroll-to-top.show {
    display: flex;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* Checkout Modal Styling */
#checkoutModal .modal-dialog {
    max-width: 900px;
    margin: 1rem auto;
}

#checkoutModal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#checkoutModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1.5rem;
}

#checkoutModal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

#checkoutModal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#checkoutModal .btn-close:hover {
    opacity: 1;
}

#checkoutModal .modal-body {
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Order Summary Card */
.checkout-summary-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.checkout-summary-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.checkout-summary-card h6::before {
    content: "🛍️";
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Customer Info Card */
.customer-info-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.customer-info-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.customer-info-card h6::before {
    content: "👤";
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Checkout Items Styling */
.checkout-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(40, 167, 69, 0.1);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.checkout-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.checkout-item .product-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Order Total Section */
.order-total-section {
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

.order-total-section .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.order-total-section .total-row:last-child {
    font-size: 1.3rem;
    font-weight: 700;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    padding-top: 0.75rem;
    margin-top: 1rem;
}

/* Form Styling */
.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    background: white;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* Delivery Method Cards */
.delivery-option {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.delivery-option:hover {
    border-color: var(--primary-color);
    background: rgba(40, 167, 69, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.delivery-option input[type="radio"]:checked + label {
    color: var(--primary-color);
    font-weight: 600;
}

.delivery-option input[type="radio"]:checked ~ .delivery-option {
    border-color: var(--primary-color);
    background: rgba(40, 167, 69, 0.1);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Payment Method Cards */
.payment-option {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.payment-option:hover {
    border-color: var(--primary-color);
    background: rgba(40, 167, 69, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.payment-option input[type="radio"]:checked + label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Payment Method Icons */
.form-check-label i {
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Modal Footer */
#checkoutModal .modal-footer {
    background: white;
    border: none;
    padding: 1.5rem 2rem;
    gap: 1rem;
}

#checkoutModal .modal-footer .btn {
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1rem;
}

/* Order Confirmation Modal */
.order-confirmation-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.order-confirmation-modal .modal-body {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Loading Animation */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    #checkoutModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #checkoutModal .modal-body {
        padding: 1.5rem 1rem;
    }
    
    #checkoutModal .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .checkout-item {
        flex-direction: column;
        text-align: center;
    }
    
    .checkout-item .product-icon {
        margin: 0 auto 1rem auto;
    }
    
    .order-total-section .total-row {
        font-size: 0.9rem;
    }
    
    .order-total-section .total-row:last-child {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    #checkoutModal .modal-header {
        padding: 1rem;
    }
    
    #checkoutModal .modal-title {
        font-size: 1.25rem;
    }
    
    .checkout-summary-card,
    .customer-info-card {
        padding: 1rem;
    }
    
    .delivery-option,
    .payment-option {
        padding: 1rem;
    }
}

/* Scrollbar for checkout items */
#checkout-items {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

#checkout-items::-webkit-scrollbar {
    width: 6px;
}

#checkout-items::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

#checkout-items::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Cute animations */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkout-item {
    animation: bounceIn 0.5s ease-out;
}

.checkout-item:nth-child(2) { animation-delay: 0.1s; }
.checkout-item:nth-child(3) { animation-delay: 0.2s; }
.checkout-item:nth-child(4) { animation-delay: 0.3s; }
.checkout-item:nth-child(5) { animation-delay: 0.4s; }
