/* Cart Page - Premium Branded Design */

/* Request Submission Modal */
.request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.request-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(45, 122, 79, 0.1);
}

.request-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-medium, #4a4a4a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    line-height: 1;
}

.request-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.request-modal-content {
    padding: 2.5rem;
}

.request-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--primary-green, #1a4d2e);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.request-modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-medium, #4a4a4a);
    margin: 0 0 2rem 0;
    line-height: 1.5;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.request-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.request-form label {
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.request-form .required {
    color: #dc3545;
}

.request-form .optional {
    color: var(--text-medium, #6c757d);
    font-weight: 400;
    font-size: 0.85rem;
}

.request-form input,
.request-form textarea {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-dark, #1a1a1a);
    box-sizing: border-box;
}

.request-form input:focus,
.request-form textarea:focus {
    outline: none;
    border-color: var(--secondary-green, #2d7a4f);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.1);
}

.request-form input:hover,
.request-form textarea:hover {
    border-color: var(--border-medium, #d1d5db);
}

.request-form textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.form-error {
    color: #dc3545;
    font-size: 0.85rem;
    min-height: 1.25rem;
    display: block;
}

.request-form .form-group-radio {
    margin-top: 0.5rem;
}

.request-form .radio-question {
    display: block;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.request-form .radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
}

.request-form .radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark, #1a1a1a);
    flex: 0 0 auto;
    white-space: nowrap;
}

.request-form .radio-option input {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--secondary-green, #2d7a4f);
    cursor: pointer;
}

.request-form .radio-option span {
    flex: 0 0 auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-cancel,
.btn-submit,
.btn-close-success,
.btn-close-error {
    flex: 1;
    min-width: 120px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark, #1a1a1a);
}

.btn-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-submit {
    background: linear-gradient(135deg, var(--secondary-green, #2d7a4f), var(--accent-green, #7fb069));
    color: white;
    box-shadow: 0 4px 12px rgba(45, 122, 79, 0.25);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 122, 79, 0.35);
    background: linear-gradient(135deg, var(--primary-green, #1a4d2e), var(--secondary-green, #2d7a4f));
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit .btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.request-success,
.request-error {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-green, #2d7a4f), var(--accent-green, #7fb069));
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: bold;
}

.error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: bold;
}

.request-success h3,
.request-error h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary-green, #1a4d2e);
    margin: 0 0 1rem 0;
}

.request-error h3 {
    color: #dc3545;
}

.request-success p,
.request-error p {
    color: var(--text-medium, #4a4a4a);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.btn-close-success,
.btn-close-error {
    background: linear-gradient(135deg, var(--secondary-green, #2d7a4f), var(--accent-green, #7fb069));
    color: white;
    box-shadow: 0 4px 12px rgba(45, 122, 79, 0.25);
}

.btn-close-success:hover,
.btn-close-error:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 122, 79, 0.35);
}

.btn-close-error {
    background: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.btn-close-error:hover {
    background: #c82333;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
}

/* Responsive */
@media (max-width: 768px) {
    .request-modal {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .request-modal-content {
        padding: 1.75rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

/* Cart Header Band - Compact Premium Header */
.cart-header-band {
    background: linear-gradient(to bottom, 
        rgba(250, 250, 250, 1) 0%,
        rgba(245, 250, 245, 0.98) 50%,
        rgba(250, 250, 250, 1) 100%);
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
    padding: clamp(3rem, 5vw, 4rem) 20px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    position: relative;
    margin-top: 0;
}

.cart-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.cart-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    color: var(--primary-green, #1a4d2e);
    margin: 0 0 0.75rem 0;
    line-height: 1.1;
    letter-spacing: -1px;
    position: relative;
    padding-bottom: 1rem;
}

.cart-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-green, #2d7a4f), var(--accent-green, #7fb069));
    border-radius: 2px;
}

.cart-subtitle {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--text-medium, #4a4a4a);
    margin: 0.5rem 0 0 0;
    letter-spacing: 0.3px;
}

/* Cart Page Container */
.cart-page {
    min-height: 60vh;
    padding: clamp(2.5rem, 4vw, 3.5rem) 20px;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .cart-container {
        grid-template-columns: 1fr 380px;
        gap: 2.5rem;
    }
}

/* Cart Items - Glass Card Style */
.cart-items {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(46, 125, 50, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    transition: background 0.2s ease;
}

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

.cart-item:hover {
    background: rgba(245, 250, 245, 0.4);
}

.cart-item-image {
    width: 140px;
    height: 140px;
    min-width: 140px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 250, 245, 0.8), rgba(230, 240, 230, 0.6));
    border: 1px solid rgba(46, 125, 50, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.cart-item-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-green, #2d7a4f);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-item-name {
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    font-weight: 600;
    color: var(--primary-green, #1a4d2e);
    margin: 0;
    line-height: 1.3;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--primary-green, #1a4d2e);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.quantity-btn:hover {
    background: rgba(46, 125, 50, 0.1);
    color: var(--secondary-green, #2d7a4f);
}

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

.quantity-input {
    width: 50px;
    height: 36px;
    padding: 0;
    text-align: center;
    border: none;
    border-left: 1px solid rgba(46, 125, 50, 0.2);
    border-right: 1px solid rgba(46, 125, 50, 0.2);
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-green, #1a4d2e);
    outline: none;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    opacity: 1;
}

.quantity-input:focus {
    background: rgba(245, 250, 245, 0.5);
}

/* Remove Item Button */
.remove-item-btn {
    padding: 0.5rem 1rem;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.remove-item-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
}

.remove-item-btn:active {
    transform: translateY(0);
}

/* Cart Item Price */
.cart-item-price {
    font-size: clamp(1.2rem, 1.4vw, 1.4rem);
    font-weight: 700;
    color: var(--primary-green, #1a4d2e);
    min-width: 100px;
    text-align: right;
    align-self: flex-start;
    padding-top: 0.25rem;
}

/* Cart Summary - Glass Card Style */
.cart-summary {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(46, 125, 50, 0.12);
    border-radius: 18px;
    padding: clamp(1.75rem, 2.5vw, 2.25rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.cart-summary-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.3rem, 1.6vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-green, #1a4d2e);
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(46, 125, 50, 0.15);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    font-size: 0.95rem;
    color: var(--text-medium, #4a4a4a);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.summary-row:last-of-type {
    border-bottom: none;
    border-top: 2px solid rgba(46, 125, 50, 0.2);
    margin-top: 1rem;
    padding-top: 1.25rem;
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    font-weight: 700;
    color: var(--primary-green, #1a4d2e);
}

.summary-row strong {
    color: var(--primary-green, #1a4d2e);
}

/* Send Order Request Button */
.send-order-request-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--secondary-green, #2d7a4f), var(--primary-green, #1a4d2e));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
    position: relative;
    overflow: hidden;
}

.send-order-request-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 ease;
}

.send-order-request-btn:hover::before {
    left: 100%;
}

.send-order-request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
    background: linear-gradient(135deg, var(--primary-green, #1a4d2e), var(--secondary-green, #2d7a4f));
}

.send-order-request-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
}

.send-order-request-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.send-order-request-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.cart-summary-note {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-medium, #666);
    font-size: 0.875rem;
    line-height: 1.5;
    padding-top: 1rem;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: clamp(3rem, 5vw, 5rem) 2rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(46, 125, 50, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.empty-cart-icon {
    font-size: clamp(4rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-cart h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--primary-green, #1a4d2e);
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.empty-cart p {
    color: var(--text-medium, #666);
    margin: 0 0 2rem 0;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.6;
}

.empty-cart .browse-plants-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--secondary-green, #2d7a4f), var(--primary-green, #1a4d2e));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.empty-cart .browse-plants-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
}

.empty-cart .browse-plants-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 991px) {
    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-price {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(229, 231, 235, 0.5);
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
        min-width: 100%;
    }
    
    .cart-item-details {
        width: 100%;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .cart-item-price {
        text-align: left;
        width: 100%;
        border-top: 1px solid rgba(229, 231, 235, 0.5);
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
    
    .cart-summary {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cart-page {
        padding: 2rem 15px;
    }
    
    .cart-item {
        padding: 1rem;
    }
    
    .quantity-control {
        width: 100%;
        justify-content: center;
    }
    
    .remove-item-btn {
        width: 100%;
        text-align: center;
    }
    
    .cart-item-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Loading State */
.cart-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-medium, #666);
}

/* Animation for cart updates */
@keyframes cartItemUpdate {
    0% {
        background: rgba(46, 125, 50, 0.1);
    }
    100% {
        background: transparent;
    }
}

.cart-item.updating {
    animation: cartItemUpdate 0.5s ease;
}
