/* ================================================
   CART PAGE - MODERN DESIGN
   ================================================ */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

.cart-page-container {
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    padding: 40px 0;
}

.cart-page-container .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================
   HEADER
   ================================================ */

.cart-page-header {
    margin-bottom: 40px;
    text-align: center;
    animation: fadeInDown 0.6s ease-out;
}

.cart-page-header h1 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    font-weight: 700;
}

.cart-page-header p {
    font-size: 1rem;
    color: #666;
}

/* ================================================
   EMPTY CART STATE
   ================================================ */

.empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease-out;
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

.empty-cart-state h2 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-cart-state p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ================================================
   MAIN WRAPPER
   ================================================ */

.cart-main-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    animation: fadeIn 0.8s ease-out;
}

/* ================================================
   ITEMS SECTION
   ================================================ */

.cart-items-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cart-items-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eef1f7;
    background: #f9fafb;
}

.cart-items-header h2 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin: 0;
    font-weight: 600;
}

.cart-items-list {
    padding: 20px;
}

/* ================================================
   CART ITEM CARD
   ================================================ */

.cart-item-card {
    display: grid;
    grid-template-columns: 100px 1fr 150px 100px 50px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    background: #fafbfc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 15px;
}

.cart-item-card:hover {
    background: #f0f3f8;
    border-color: #8C04A4;
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.12);
}

.cart-item-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 1px solid #eef1f7;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item-card:hover .cart-item-image img {
    transform: scale(1.05);
}

.cart-item-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #eef1f7;
    color: #999;
    font-size: 0.75rem;
    text-align: center;
    padding: 5px;
}

/* ================================================
   ITEM DETAILS
   ================================================ */

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-header {
    margin-bottom: 8px;
}

.item-header h3 {
    font-size: 1rem;
    color: #1a1a2e;
    margin: 0 0 5px 0;
    font-weight: 600;
    line-height: 1.3;
}

.item-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.unit-price {
    font-size: 1.2rem;
    color: #8C04A4;
    font-weight: 700;
}

.unit-label {
    font-size: 0.75rem;
    color: #999;
}

/* ================================================
   QUANTITY CONTROL
   ================================================ */

.cart-item-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cart-item-quantity label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    color: #8C04A4;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f0f3f8;
    color: #6B0381;
}

.qty-control input {
    width: 50px;
    border: none;
    text-align: center;
    font-size: 1rem;
    color: #1a1a2e;
    font-weight: 600;
    background: white;
}

.qty-control input:focus {
    outline: none;
}

/* ================================================
   ITEM TOTAL
   ================================================ */

.cart-item-total {
    text-align: center;
}

.total-amount {
    font-size: 1.3rem;
    color: #27ae60;
    font-weight: 700;
}

/* ================================================
   ITEM ACTIONS
   ================================================ */

.cart-item-actions {
    display: flex;
    justify-content: center;
}

.btn-remove {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #ffe6e6;
    transform: scale(1.1);
}

/* ================================================
   CONTINUE SHOPPING
   ================================================ */

.cart-continue-shopping {
    padding: 20px 30px;
    border-top: 1px solid #eef1f7;
    background: #f9fafb;
    text-align: left;
}

/* ================================================
   SUMMARY SECTION
   ================================================ */

.cart-summary-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 25px;
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-card h2 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin: 0 0 20px 0;
    font-weight: 600;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

.summary-content {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
    color: #666;
    border-bottom: 1px solid #eef1f7;
}

.summary-label {
    font-weight: 500;
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: #1a1a2e;
}

.summary-row.discount-row {
    color: #27ae60;
}

.discount-value {
    color: #27ae60 !important;
    font-weight: 700;
}

.summary-divider {
    height: 1px;
    background: #eef1f7;
    margin: 15px 0;
}

.summary-row.total-row {
    border-bottom: none;
    padding: 15px 0;
    font-size: 1.2rem;
}

.summary-row.total-row .summary-label {
    color: #1a1a2e;
    font-weight: 700;
}

.total-value {
    color: #8C04A4 !important;
    font-size: 1.4rem;
    font-weight: 700;
}

/* ================================================
   COUPON SECTION
   ================================================ */

.coupon-section {
    margin: 25px 0;
    padding: 20px;
    background: #E8D4F8;
    border-left: 4px solid #8C04A4;
    border-radius: 8px;
}

.coupon-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coupon-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    padding: 0 12px;
    gap: 8px;
    height: 42px;
}

.coupon-input-group i {
    color: #8C04A4;
    font-size: 1.1rem;
}

.coupon-form input {
    padding: 10px 0;
    border: none;
    font-size: 0.95rem;
    background: transparent;
    flex: 1;
    transition: all 0.3s;
}

.coupon-form input:focus {
    outline: none;
    border-color: #8C04A4;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.coupon-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.coupon-badge {
    display: inline-block;
    padding: 8px 12px;
    background: #27ae60;
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-remove-coupon {
    color: #e74c3c;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-remove-coupon:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* ================================================
   COUPON SUCCESS NOTIFICATION
   ================================================ */
.coupon-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

.coupon-success-notification i {
    font-size: 1.2rem;
}

/* ================================================
   BUTTONS
   ================================================ */

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
    background: linear-gradient(135deg, #8C04A4 0%, #6B0381 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

.checkout-btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: #8C04A4;
    border: 2px solid #8C04A4;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: #8C04A4;
    color: white;
}

.btn-outline.btn-small {
    padding: 0 15px;
    font-size: 0.9rem;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-outline.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #8C04A4 0%, #6B0381 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.3);
}

.btn-primary.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
}

/* ================================================
   PAYMENT METHODS
   ================================================ */

.payment-methods {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eef1f7;
}

.payment-methods h3 {
    font-size: 1rem;
    color: #1a1a2e;
    margin: 0 0 15px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-methods i {
    color: #8C04A4;
}

.methods-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #E8D4F8;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: default;
}

.payment-method:hover {
    background: #C066E8;
    transform: translateY(-2px);
}

.payment-method i,
.pix-icon {
    font-size: 1.5rem;
    color: #8C04A4;
    margin-bottom: 5px;
}

.pix-icon {
    width: 24px;
    height: 24px;
}

.payment-method span {
    font-size: 0.85rem;
    color: #1a1a2e;
    font-weight: 600;
}

/* ================================================
   SHIPPING SECTION
   ================================================ */

.shipping-section {
    margin: 20px 0;
    padding: 20px;
    background: #E8D4F8;
    border-left: 4px solid #8C04A4;
    border-radius: 8px;
}

.shipping-section h3 {
    font-size: 1rem;
    color: #1a1a2e;
    margin: 0 0 15px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shipping-section i {
    color: #8C04A4;
}

.shipping-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.shipping-input-group label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shipping-input-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s;
    height: 42px;
}

.shipping-input-group input:focus {
    outline: none;
    border-color: #8C04A4;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

#shipping-result {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #27ae60;
}

#shipping-message {
    font-size: 0.9rem;
    color: #27ae60;
    margin: 0;
    font-weight: 600;
}

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 1024px) {
    .cart-main-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cart-item-card {
        grid-template-columns: 80px 1fr 1fr;
        gap: 15px;
    }

    .cart-item-quantity,
    .cart-item-total,
    .cart-item-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .cart-page-header h1 {
        font-size: 2rem;
    }

    .cart-item-card {
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 15px;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-details {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    .item-header h3 {
        font-size: 0.95rem;
    }

    .unit-price {
        font-size: 1rem;
    }

    .cart-item-quantity,
    .cart-item-total,
    .cart-item-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 10px;
        border-top: 1px solid #eef1f7;
    }

    .cart-item-quantity {
        order: 1;
    }

    .cart-item-total {
        order: 2;
    }

    .cart-item-actions {
        order: 3;
    }

    .qty-control {
        flex-direction: row;
    }

    .coupon-form {
        grid-template-columns: 1fr;
    }

    .coupon-form .btn-outline {
        width: 100%;
    }

    .shipping-form {
        grid-template-columns: 1fr;
    }

    .shipping-form .btn-outline {
        width: 100%;
    }

    .cart-page-container .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .cart-page-header h1 {
        font-size: 1.5rem;
    }

    .cart-page-header p {
        font-size: 0.9rem;
    }

    .cart-items-header {
        padding: 15px 20px;
    }

    .cart-items-list {
        padding: 15px;
    }

    .cart-item-card {
        grid-template-columns: 60px 1fr;
        gap: 10px;
        padding: 12px;
        margin-bottom: 12px;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .item-header h3 {
        font-size: 0.9rem;
    }

    .unit-price {
        font-size: 0.95rem;
    }

    .total-amount {
        font-size: 1.1rem;
    }

    .summary-card {
        padding: 20px;
    }

    .summary-card h2 {
        font-size: 1.1rem;
    }

    .summary-row {
        font-size: 0.9rem;
        padding: 10px 0;
    }

    .summary-row.total-row {
        font-size: 1.1rem;
    }

    .total-value {
        font-size: 1.2rem;
    }

    .checkout-btn {
        padding: 12px;
        font-size: 1rem;
    }

    .empty-cart-state {
        padding: 60px 15px;
    }

    .empty-cart-icon {
        font-size: 60px;
    }

    .empty-cart-state h2 {
        font-size: 1.5rem;
    }

    .empty-cart-state p {
        font-size: 0.95rem;
    }
}
