.cart-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 40px;
}

.cart-list-section {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

.cart-page-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
}

.cart-empty-msg {
    text-align: center;
    padding: 50px 0;
    color: #999;
}
.cart-empty-icon {
    font-size: 4rem;
    color: #eee;
    margin-bottom: 15px;
}
.btn-soft {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: var(--dark);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
}
.btn-soft:hover {
    background: #e0e0e0;
}

.cp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #f9f9f9;
    transition: 0.2s;
}
.cp-item:last-child { border-bottom: none; }
.cp-item:hover { background: #fffcfb; }

.cp-item-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.cp-img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    background: #f5f5f5;
}
.cp-info h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 4px;
}
.cp-info p {
    font-size: 0.85rem;
    color: #888;
}
.cart-item-customizations {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
}

.cp-item-right {
    display: flex;
    align-items: center;
    gap: 25px;
}
.cp-qty-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 5px 10px;
}
.cp-qty-val {
    font-weight: 700;
    min-width: 25px;
    text-align: center;
    font-size: 1rem;
}
.cp-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
}
.cp-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    transition: 0.2s;
    display: flex;
    align-items: center;
}
.cp-remove:hover { color: #ff4d4d; }

.checkout-section {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.delivery-toggle {
    display: flex;
    gap: 10px;
    background: #f8f8f8;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 25px;
}
.dt-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 12px 5px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    color: #888;
    border: 1px solid transparent;
}
.dt-option input { display: none; }
.dt-option:hover { background: #fff; color: var(--dark); }
.dt-option.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-color: #eee;
}
.dt-option span.material-symbols-outlined { font-size: 1.6rem; }
.dt-option span:nth-child(3) { font-weight: 700; font-size: 0.95rem; }
.dt-option small { font-size: 0.75rem; font-weight: 400; color: #aaa; }

.login-prompt {
    text-align: center;
    padding: 30px 10px;
}
.login-prompt span.material-symbols-outlined {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 15px;
}
.login-prompt h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 700;
}
.login-prompt p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.register-link {
    margin-top: 15px;
    font-size: 0.9rem;
}
.register-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.form-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    margin: 20px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cf-group { margin-bottom: 12px; }
.cf-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}
.cf-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: 0.3s;
    background: #fcfcfc;
    font-size: 0.9rem;
}
.cf-input:focus {
    border-color: var(--primary);
    background: #fff;
}

.phone-group {
    display: flex;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fcfcfc;
    overflow: hidden;
}
.phone-prefix {
    background: #f0f0f0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    border-right: 1px solid #eee;
}
.phone-flag { font-size: 1.2rem; }
.phone-group .cf-input {
    border: none;
    border-radius: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #666;
    font-size: 0.95rem;
}
.summary-row.total {
    border-top: 2px dashed #eee;
    padding-top: 20px;
    margin-top: 20px;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.3rem;
    align-items: center;
}
.total span:last-child {
    color: var(--primary);
    font-size: 1.6rem;
    font-family: 'Oswald', sans-serif;
}

.complete-order-btn {
    width: 100%;
    background: var(--dark);
    color: #fff;
    padding: 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.complete-order-btn span {
    margin-left: 5px;
}
.complete-order-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255,110,55,0.3);
}

#delivery-address-section.show { display: block; }
#delivery-address-section.hide { display: none; }
#shipping-row.show { display: flex; }
#shipping-row.hide { display: none; }

.pay-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}
.pay-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    background: #fcfcfc;
    position: relative;
}
.pay-option:hover { background: #fff; border-color: #ddd; }
.pay-option input { display: none; }
.pay-option input:checked ~ .pay-card-content .pay-icon { color: var(--primary); }
.pay-option input:checked ~ .check-icon { opacity: 1; transform: scale(1); color: var(--primary); }
.pay-option:has(input:checked) {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.pay-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}
.pay-icon { font-size: 2rem; color: #999; transition: 0.2s; }
.pay-text { display: flex; flex-direction: column; }
.pay-title { font-weight: 700; font-size: 0.95rem; color: var(--dark); }
.pay-desc { font-size: 0.8rem; color: #888; }

.check-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: 0.2s;
    font-size: 1.5rem;
}

.sub-pay-container {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 15px;
    margin-top: -5px;
    margin-bottom: 20px;
    display: none;
}
.sub-pay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}
.sub-pay-option {
    cursor: pointer;
}
.sub-pay-option input { display: none; }
.sub-pay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
    height: 100%;
    min-height: 80px;
}
.sub-pay-content img { height: 28px; object-fit: contain; }
.sub-pay-content span { font-size: 0.75rem; color: #666; text-align: center; font-weight: 500; }
.sub-pay-option input:checked ~ .sub-pay-content {
    border-color: var(--primary);
    background: #fff5f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.payment-error-msg {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 15px;
    text-align: center;
}
.hidden { display: none; }

@media (max-width: 900px) {
    .cart-page-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .checkout-section {
        position: static;
    }
}

@media (max-width: 480px) {
    .cp-img { width: 50px; height: 50px; }
    .cp-info h4 { font-size: 1rem; }
    .cp-price { font-size: 1rem; }
    .cp-item-right { gap: 15px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .sub-pay-grid { grid-template-columns: repeat(3, 1fr); }
}