/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #010080;
    --primary-yellow: #c0a533;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

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

/* Cart Hero Section */
.cart-hero {
    background-color: var(--white);
    padding: 60px 0 30px 0;
}

.section-title-wrapper {
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    position: relative;
    display: block;
    padding: 0 20px;
    width: fit-content;
    text-align: center;
}

.title-underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-yellow);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
    align-self: center;
}

.title-underline::before,
.title-underline::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background-color: var(--primary-yellow);
    border-radius: 50%;
    transform: translateY(-50%);
}

.title-underline::before {
    left: -20px;
}

.title-underline::after {
    right: -20px;
}

/* Cart Content Section */
.cart-content-section {
    background-color: var(--white);
    padding: 40px 0 80px 0;
}

.cart-items-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.cart-header {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-light);
}

.cart-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
}

.cart-count {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Cart Items */
.cart-items {
    margin-top: 30px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    padding: 25px 0;
    border-bottom: 1px solid #e0e0e0;
    gap: 20px;
}

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

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--bg-light);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.cart-item-category {
    font-size: 0.9rem;
    color: var(--primary-yellow);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.cart-item-price {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item-price .price-unit {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

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

@media (max-width: 768px) {
    .cart-item-price {
        border-top: 1px solid #e0e0e0;
        padding-top: 8px;
        margin-top: 8px;
    }
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 5px;
}

.quantity-btn {
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.quantity-btn:hover {
    background-color: var(--primary-yellow);
    color: var(--white);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: transparent;
}

.quantity-input:focus {
    outline: none;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px 10px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.remove-item-btn:hover {
    background-color: #dc3545;
    color: var(--white);
}

/* Empty Cart */
.empty-cart {
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 5rem;
    color: var(--primary-blue);
    opacity: 0.2;
    margin-bottom: 20px;
}

.empty-cart-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.empty-cart-text {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-primary-cart {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-primary-cart:hover {
    background-color: var(--primary-yellow);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 165, 51, 0.3);
}

/* Cart Summary */
.cart-summary-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-yellow);
}

.summary-details {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-dark);
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    margin-top: 15px;
}

/* Free Shipping Message */
.free-shipping-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--white);
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    animation: slideInDown 0.3s ease-out;
}

.free-shipping-message i {
    font-size: 1.1rem;
}

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

/* Shipping Progress */
.shipping-progress {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.progress-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.progress-text i {
    color: var(--primary-yellow);
    font-size: 1rem;
}

.progress-text strong {
    color: var(--primary-blue);
    font-weight: 700;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-yellow) 0%, #d4b842 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.coupon-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: block;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.form-control {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 0.2rem rgba(192, 165, 51, 0.25);
}

.btn-coupon {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-coupon:hover {
    background-color: var(--primary-yellow);
    transform: translateY(-2px);
}

.coupon-message {
    margin-top: 10px;
    font-size: 0.9rem;
    min-height: 20px;
}

.coupon-message.success {
    color: #28a745;
}

.coupon-message.error {
    color: #dc3545;
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-checkout:hover {
    background-color: var(--primary-yellow);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 165, 51, 0.3);
}

.btn-checkout:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.security-info i {
    color: var(--primary-yellow);
}

.continue-shopping {
    text-align: center;
}

.continue-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.continue-link:hover {
    color: var(--primary-yellow);
    transform: translateX(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-hero {
        padding: 40px 0 20px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        padding: 0 15px;
        margin-bottom: 10px;
    }
    
    .title-underline {
        width: 50px;
        height: 3px;
    }
    
    .title-underline::before,
    .title-underline::after {
        width: 6px;
        height: 6px;
    }
    
    .title-underline::before {
        left: -12px;
    }
    
    .title-underline::after {
        right: -12px;
    }
    
    .cart-content-section {
        padding: 20px 0 40px 0;
    }
    
    .cart-items-wrapper,
    .cart-summary-wrapper {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .cart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 15px;
    }
    
    .cart-section-title {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .cart-count {
        font-size: 0.9rem;
    }
    
    .cart-items {
        margin-top: 20px;
    }
    
    .cart-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 0;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .cart-item-details {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .cart-item-name {
        font-size: 0.95rem;
        margin-bottom: 0;
        line-height: 1.4;
        color: #000000;
        font-weight: 600;
    }
    
    .cart-item-category {
        display: none;
    }
    
    .cart-item-price {
        margin-top: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-top: 8px;
        border-top: 1px solid #e0e0e0;
    }
    
    .cart-item-price .price-unit {
        display: none;
    }
    
    .cart-item-price .price-total {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary-blue);
        margin: 0;
    }
    
    .cart-item-actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 8px;
    }
    
    .quantity-controls {
        width: auto;
        justify-content: flex-start;
        padding: 4px;
        gap: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #f8f9fa;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        flex-shrink: 0;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        color: var(--text-dark);
    }
    
    .quantity-btn:hover {
        background-color: #f0f0f0;
        color: var(--text-dark);
    }
    
    .quantity-input {
        width: 40px;
        font-size: 1rem;
        font-weight: 600;
        background: transparent;
    }
    
    .remove-item-btn {
        width: auto;
        padding: 0;
        font-size: 0.95rem;
        text-align: left;
        color: #dc3545;
        background: none;
        border: none;
        text-decoration: underline;
    }
    
    .remove-item-btn:hover {
        background: none;
        color: #c82333;
        text-decoration: underline;
    }
    
    .cart-summary-wrapper {
        position: static;
        margin-top: 0;
    }
    
    .summary-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .summary-row {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .summary-total {
        font-size: 1.2rem;
        padding-top: 12px;
        margin-top: 12px;
    }
    
    .coupon-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .input-group {
        flex-direction: row;
        gap: 10px;
        align-items: stretch;
    }
    
    .form-control {
        flex: 1;
        width: auto;
        padding: 12px 15px;
        font-size: 1rem;
        border: 2px solid #e0e0e0;
        border-radius: 5px;
    }
    
    .form-control:focus {
        border-color: var(--primary-yellow);
    }
    
    .btn-coupon {
        flex-shrink: 0;
        padding: 12px 20px;
        white-space: nowrap;
    }
    
    .btn-checkout {
        padding: 16px 20px;
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .security-info {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
    
    .continue-link {
        font-size: 0.95rem;
    }
    
    .empty-cart {
        padding: 40px 15px;
    }
    
    .empty-cart-icon {
        font-size: 4rem;
        margin-bottom: 15px;
    }
    
    .empty-cart-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .empty-cart-text {
        font-size: 0.95rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .btn-primary-cart {
        padding: 14px 25px;
        font-size: 0.95rem;
    }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .cart-hero {
        padding: 30px 0 15px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding: 0 10px;
    }
    
    .cart-content-section {
        padding: 15px 0 30px 0;
    }
    
    .cart-items-wrapper,
    .cart-summary-wrapper {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    .cart-header {
        gap: 8px;
        padding-bottom: 12px;
    }
    
    .cart-section-title {
        font-size: 1.2rem;
    }
    
    .cart-count {
        font-size: 0.85rem;
    }
    
    .cart-item {
        padding: 12px 0;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 90px;
        height: 90px;
    }
    
    .cart-item-name {
        font-size: 0.9rem;
    }
    
    .cart-item-price .price-total {
        font-size: 1rem;
    }
    
    .quantity-controls {
        gap: 10px;
        padding: 3px;
    }
    
    .quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .quantity-input {
        width: 35px;
        font-size: 0.95rem;
    }
    
    .remove-item-btn {
        font-size: 0.9rem;
    }
    
    .summary-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .summary-row {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .summary-total {
        font-size: 1.1rem;
    }
    
    .btn-checkout {
        padding: 14px 18px;
        font-size: 0.95rem;
    }
    
    .empty-cart-icon {
        font-size: 3.5rem;
    }
    
    .empty-cart-title {
        font-size: 1.3rem;
    }
    
    .empty-cart-text {
        font-size: 0.9rem;
    }
}

/* Delete Confirmation Modal */
.delete-confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.delete-confirm-modal.show {
    display: flex;
}

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

.delete-confirm-modal-content {
    background: var(--white);
    border-radius: 15px;
    padding: 40px 35px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideUp 0.3s ease-out;
    position: relative;
}

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

.delete-confirm-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.delete-confirm-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.delete-confirm-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.delete-confirm-message {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.delete-confirm-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-delete-cancel,
.btn-delete-confirm {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 120px;
}

.btn-delete-cancel {
    background-color: #f0f0f0;
    color: var(--text-dark);
}

.btn-delete-cancel:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-delete-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-delete-confirm:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-delete-confirm:active {
    transform: translateY(0);
}

@media (max-width: 576px) {
    .delete-confirm-modal-content {
        padding: 30px 25px;
        max-width: 90%;
    }
    
    .delete-confirm-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .delete-confirm-icon i {
        font-size: 2rem;
    }
    
    .delete-confirm-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .delete-confirm-message {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .delete-confirm-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-delete-cancel,
    .btn-delete-confirm {
        width: 100%;
        padding: 14px 20px;
    }
}
