/* cart3.css */

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icon {
    display: inline-block;
    padding: 5px 0;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

.navbar-right .back-to-shopping:hover {
    background: #ffebd7;
    color: #8b4513;
}

.profile-link:hover .username {
    color: #ffa07a;
}

.logout-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 5px 0;
    z-index: 1001;
}

.logout-dropdown a {
    display: block;
    padding: 8px 15px;
    color: #e74c3c;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.logout-dropdown a:hover {
    background: #ffebd7;
}

.cart-summary {
    width: 25%;
    min-width: 250px;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: auto;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.cart-summary h3 {
    font-size: 16px;
    color: #8b4513;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: 'Arial', sans-serif;
}

.cart-summary p {
    font-size: 14px;
    color: #8b4513;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    font-family: 'Open Sans', sans-serif;
}

.cart-summary p.subtotal-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary p.subtotal-line #subtotal-text {
    margin: 0;
    padding: 0;
    color: #8b4513;
}

.cart-summary p.subtotal-line #item-count {
    color: #ffa07a;
}

.cart-summary p.discount-line, .cart-summary p.cashback-line {
    display: none;
    justify-content: space-between;
    align-items: center;
}

.cart-summary p.discount-line span:first-child {
    color: #8b4513;
}

.cart-summary p.discount-line span:last-child {
    text-align: right;
    color: #e74c3c;
}

.cart-summary p.cashback-line span:first-child {
    color: #8b4513;
}

.cart-summary p.cashback-line span:last-child {
    text-align: right;
    color: #008000;
}

.cart-summary p span {
    color: #ffa07a;
    white-space: nowrap;
}

.cart-summary p.shipping-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary p.shipping-line span:first-child {
    color: #8b4513;
    white-space: nowrap;
}

.cart-summary p.shipping-line span:first-child::after {
    content: '';
    display: inline;
}

.cart-summary p.shipping-line .discount-percentage {
    color: #ffa07a !important;
    display: inline;
    margin: 0;
}

.cart-summary p.shipping-line span:last-child {
    color: #ffa07a;
    text-align: right;
    white-space: nowrap;
}

.cart-summary p.original-shipping-line {
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-size: 14px;
}

.cart-summary p.original-shipping-line .original-shipping-fee {
    text-decoration: line-through;
    text-decoration-style: solid;
    color: #888888;
}

#subtotal-amount, #shipping-fee, #grand-total, #discount-amount, #cashback-amount {
    white-space: nowrap;
    text-align: right;
}

.cart-summary .grand-total {
    font-size: 16px;
    font-weight: 700;
    border-top: 1px solid #d2b48c;
    padding-top: 8px;
    margin-top: 8px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
}

.cart-summary .grand-total span:first-child {
    color: #8b4513;
}

.coupon-section {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coupon-label-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.coupon-section label {
    font-size: 14px;
    color: #8b4513;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;
    text-align: center;
}

.coupon-input-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.coupon-section input {
    padding: 8px;
    border: 2px solid #d2b48c;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 0;
}

.coupon-section input:focus {
    border-color: #deb887;
    outline: none;
}

.coupon-section button {
    padding: 8px 16px;
    background: #ffa07a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    width: 80px;
    flex-shrink: 0;
}

.coupon-section button:hover {
    background: #ff8c69;
    transform: scale(1.05);
}

.coupon-section .select-freebie-btn {
    padding: 8px 16px;
    background: #deb887;
    color: #5c2f0d;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    width: 100%;
    display: none;
    text-align: center;
}

.coupon-section .select-freebie-btn:hover {
    background: #d2b48c;
    transform: scale(1.05);
}

.applied-coupon-container {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f0e4c8;
    border: 1px solid #d2b48c;
    border-radius: 5px;
    padding: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #8b4513;
    width: 100%;
    justify-content: space-between;
}

#applied-coupon {
    font-weight: 600;
    color: #ffa07a;
    text-transform: uppercase;
}

.remove-coupon-btn {
    background: #e74c3c;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    margin-left: auto;
}

.remove-coupon-btn::before {
    content: '\2715';
    font-size: 12px;
    color: white;
}

.remove-coupon-btn:hover {
    background: #ff6666;
    color: white;
    transform: scale(1.1);
}

.remove-coupon-btn:hover::before {
    color: white;
}

.checkout-btn {
    padding: 8px 12px;
    background: #ffa07a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
    font-family: 'Open Sans', sans-serif;
}

.checkout-btn:disabled {
    background: #d3d3d3;
    cursor: not-allowed;
}

.checkout-btn:hover:not(:disabled) {
    background: #ff8c69;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 140, 105, 0.3);
}

.remove-selected-btn {
    padding: 8px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 2px;
    font-family: 'Open Sans', sans-serif;
}

.remove-selected-btn:disabled {
    background: #d3d3d3;
    cursor: not-allowed;
}

.remove-selected-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.footer-section a:hover {
    color: #ffebd7;
}

@media (max-width: 768px) {
    .cart-summary {
        width: 100%;
        max-width: 100%;
        height: auto;
        position: static;
    }

    .coupon-section {
        flex-direction: column;
        gap: 6px;
    }

    .coupon-input-container {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        width: 100%;
    }

    .coupon-section input {
        padding: 6px;
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }

    .coupon-section button {
        padding: 6px 12px;
        font-size: 10px;
        width: 70px;
        flex-shrink: 0;
    }

    .coupon-section .select-freebie-btn {
        padding: 6px 12px;
        font-size: 10px;
        width: 100%;
    }

    .applied-coupon-container {
        padding: 6px;
        font-size: 12px;
        gap: 6px;
        justify-content: space-between;
    }

    .remove-coupon-btn {
        font-size: 12px;
        width: 20px;
        height: 20px;
        margin-left: auto;
    }

    .remove-coupon-btn::before {
        font-size: 10px;
        color: white;
    }

    .remove-coupon-btn:hover {
        background: #ff6666;
        color: white;
    }

    .remove-coupon-btn:hover::before {
        color: white;
    }

    .cart-summary p.discount-line {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .cart-summary p.discount-line span:first-child {
        color: #8b4513;
    }

    .cart-summary p.discount-line span:last-child {
        color: #e74c3c;
    }

    .cart-summary p.cashback-line {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .cart-summary p.cashback-line span:first-child {
        color: #8b4513;
    }

    .cart-summary p.cashback-line span:last-child {
        color: #008000;
    }

    .cart-summary p.shipping-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-summary p.shipping-line span:first-child {
        color: #8b4513;
        white-space: nowrap;
    }

    .cart-summary p.shipping-line .discount-percentage {
        color: #ffa07a !important;
        margin: 0;
    }

    .cart-summary p.shipping-line span:last-child {
        color: #ffa07a;
        text-align: right;
    }

    .cart-summary p.original-shipping-line {
        display: flex;
        justify-content: space-between;
        margin: 0;
        font-size: 12px;
    }

    .cart-summary p.original-shipping-line .original-shipping-fee {
        text-decoration: line-through;
        text-decoration-style: solid;
        color: #888888;
    }

    .remove-selected-btn {
        margin-bottom: 10px;
    }

    .checkout-btn {
        padding: 6px 10px;
        background: #ffa07a;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .cart-summary {
        min-width: 200px;
        padding: 10px;
    }

    .cart-summary h3 {
        font-size: 14px;
    }

    .cart-summary p {
        font-size: 12px;
    }

    .cart-summary .grand-total {
        font-size: 14px;
    }

    .checkout-btn, .remove-selected-btn {
        padding: 6px 10px;
        font-size: 10px;
    }

    .coupon-section input {
        padding: 5px;
        font-size: 10px;
    }

    .coupon-section button {
        padding: 5px 10px;
        font-size: 9px;
        width: 60px;
    }

    .coupon-section .select-freebie-btn {
        padding: 5px 10px;
        font-size: 9px;
        width: 100%;
    }

    .applied-coupon-container {
        padding: 5px;
        font-size: 10px;
        gap: 5px;
        justify-content: space-between;
    }

    .remove-coupon-btn {
        font-size: 10px;
        width: 18px;
        height: 18px;
        margin-left: auto;
    }

    .remove-coupon-btn::before {
        font-size: 8px;
        color: white;
    }

    .remove-coupon-btn:hover {
        background: #ff6666;
        color: white;
    }

    .remove-coupon-btn:hover::before {
        color: white;
    }

    .cart-summary p.discount-line {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .cart-summary p.discount-line span:first-child {
        color: #8b4513;
    }

    .cart-summary p.discount-line span:last-child {
        color: #e74c3c;
    }

    .cart-summary p.cashback-line {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .cart-summary p.cashback-line span:first-child {
        color: #8b4513;
    }

    .cart-summary p.cashback-line span:last-child {
        color: #008000;
    }

    .cart-summary p.shipping-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-summary p.shipping-line span:first-child {
        color: #ffa07a;
        white-space: nowrap;
    }

    .cart-summary p.shipping-line .discount-percentage {
        color: #ffa07a !important;
        margin: 0;
    }

    .cart-summary p.shipping-line span:last-child {
        color: #ffa07a;
        text-align: right;
    }

    .cart-summary p.original-shipping-line {
        display: flex;
        justify-content: space-between;
        margin: 0;
        font-size: 10px;
    }

    .cart-summary p.original-shipping-line .original-shipping-fee {
        text-decoration: line-through;
        text-decoration-style: solid;
        color: #888888;
    }

    .checkout-btn {
        padding: 6px 10px;
        background: #ffa07a;
        margin-bottom: 10px;
    }
}