/* Custom Checkout CSS - Matches chekout.html 1:1 */

/* Reset all Magento default styles for custom checkout */
#custom-checkout-wrapper {
    all: unset;
    display: block;
}

#custom-checkout-wrapper * {
    all: unset;
    display: revert;
}

/* Custom Checkout Styles - 1:1 from chekout.html */
#custom-checkout-wrapper {
    --primary-text: #1c1c1c;
    --secondary-text: #666;
    --border-color: #eee;
    --green-bg: #d4f7e6;
    --green-text: #1f8b57;
    --dark-btn: #232f3e;
    --bg-color: #f8f8f8;
}

#custom-checkout-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}

#custom-checkout-wrapper {
    background-color: #f1f3f7;
    color: var(--primary-text);
    padding: 40px;
}

/* Container */
#custom-checkout-wrapper .custom-checkout-container {
    max-width: 1400px;
    margin: 0 auto;
}

#custom-checkout-wrapper h1.custom-page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #222;
}

/* Layout Grid */
#custom-checkout-wrapper .custom-cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* --- Left Column --- */
#custom-checkout-wrapper .custom-left-col {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 0.5px solid #e0e0e0;
    background: white;
}

/* Green Banner */
#custom-checkout-wrapper .custom-promo-banner {
    background-color: var(--green-bg);
    color: var(--green-text);
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 500;
}

#custom-checkout-wrapper .custom-coupon-badge {
    border: 1px dashed var(--green-text);
    padding: 5px 15px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Cart Table Headers */
#custom-checkout-wrapper .custom-cart-header {
    display: grid;
    grid-template-columns: 4fr 1fr 1.5fr 1fr;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Product Row */
#custom-checkout-wrapper .custom-cart-item {
    display: grid;
    grid-template-columns: 4fr 1fr 1.5fr 1fr;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

#custom-checkout-wrapper .custom-product-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

#custom-checkout-wrapper .custom-remove-icon {
    color: #ff4d4f;
    cursor: pointer;
    margin-right: 10px;
    font-size: 18px;
}

#custom-checkout-wrapper .custom-remove-icon:hover {
    color: #ff1a1a;
}

#custom-checkout-wrapper .custom-product-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

#custom-checkout-wrapper .custom-product-name {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

#custom-checkout-wrapper .custom-price,
#custom-checkout-wrapper .custom-subtotal {
    font-weight: 500;
    color: #333;
}

/* Quantity Selector */
#custom-checkout-wrapper .custom-qty-selector {
    display: inline-flex;
    background-color: #eee;
    padding: 8px 15px;
    border-radius: 2px;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

#custom-checkout-wrapper .custom-qty-btn {
    cursor: pointer;
    user-select: none;
}

/* Coupon & Update Actions */
#custom-checkout-wrapper .custom-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

#custom-checkout-wrapper .custom-coupon-input-group {
    display: flex;
    gap: 10px;
}

#custom-checkout-wrapper .custom-coupon-input-group input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    outline: none;
}

#custom-checkout-wrapper .custom-coupon-input-group button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
}

#custom-checkout-wrapper .custom-coupon-input-group button:hover {
    background-color: #555;
}

#custom-checkout-wrapper .custom-update-cart-link {
    color: #333;
    text-decoration: underline;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

/* --- Right Column (Totals) --- */
#custom-checkout-wrapper .custom-right-col {
    background: white;
    border-radius: 8px;
    border: 0.5px solid #e0e0e0;
}

#custom-checkout-wrapper .custom-cart-totals {
    background: white;
    padding: 30px;
    border-radius: 8px;
}

#custom-checkout-wrapper .custom-totals-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: px solid #eee;
    padding-bottom: 15px;
}

#custom-checkout-wrapper .custom-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

#custom-checkout-wrapper .custom-shipping-section {
    margin-bottom: 20px;
}

#custom-checkout-wrapper .custom-shipping-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 15px;
}

#custom-checkout-wrapper .custom-shipping-option {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    align-items: center;
}

#custom-checkout-wrapper .custom-shipping-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#custom-checkout-wrapper .custom-shipping-option input[type="radio"] {
    cursor: pointer;
}

#custom-checkout-wrapper .custom-shipping-destination {
    margin-top: 20px;
    font-size: 13px;
    color: #333;
}

#custom-checkout-wrapper .custom-change-address {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #555;
    text-decoration: underline;
    margin-top: 5px;
    cursor: pointer;
}

#custom-checkout-wrapper .custom-final-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 20px;
}

#custom-checkout-wrapper .custom-checkout-btn {
    width: 100%;
    background-color: var(--dark-btn);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 20px;
    text-align: center;
}

#custom-checkout-wrapper .custom-checkout-btn:hover {
    background-color: #3a4a5e;
}

#custom-checkout-wrapper .custom-secure-text {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#custom-checkout-wrapper .custom-secure-text .icon-dukamarket {
    font-size: 14px;
    color: #28a745;
}

#custom-checkout-wrapper .custom-payment-icons {
    display: flex;
    justify-content: center;
    gap: 5px;
}

#custom-checkout-wrapper .custom-payment-icons img {
    height: 20px;
}

/* Utilities */
#custom-checkout-wrapper .custom-text-right {
    text-align: right;
}

/* Trust Badges Grid (from cartpage.html) */
#custom-checkout-wrapper .custom-trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

#custom-checkout-wrapper .custom-trust-item {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

#custom-checkout-wrapper .custom-trust-icon {
    font-size: 32px;
    margin-bottom: 15px;
    color: #232f3e;
}

#custom-checkout-wrapper .custom-trust-icon .icon-dukamarket {
    font-size: 32px;
}

#custom-checkout-wrapper .custom-trust-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #4a5568;
}

#custom-checkout-wrapper .custom-trust-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
}

/* Product links styling */
#custom-checkout-wrapper .custom-product-name {
    color: #333;
    text-decoration: none;
}

#custom-checkout-wrapper .custom-product-name:hover {
    color: #232f3e;
    text-decoration: underline;
}

/* Responsive Design - Comprehensive Mobile Support */

/* Large Desktop (1200px+) - Default styles apply */

/* Desktop to Tablet Transition (1024px) */
@media (max-width: 1024px) {
    #custom-checkout-wrapper {
        padding: 30px 20px;
    }

    #custom-checkout-wrapper .custom-cart-layout {
        gap: 25px;
    }

    #custom-checkout-wrapper .custom-cart-header,
    #custom-checkout-wrapper .custom-cart-item {
        grid-template-columns: 3.5fr 1fr 1.5fr 1fr;
    }

    #custom-checkout-wrapper .custom-trust-grid {
        gap: 15px;
    }
}

/* Tablet Portrait (900px) */
@media (max-width: 900px) {
    #custom-checkout-wrapper {
        padding: 25px 15px;
    }

    #custom-checkout-wrapper .custom-cart-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #custom-checkout-wrapper .custom-right-col {
        order: -1; /* Move totals to top on tablet */
        max-width: 100%;
    }

    #custom-checkout-wrapper .custom-cart-totals {
        max-width: 500px;
        margin: 0 auto;
    }

    #custom-checkout-wrapper .custom-trust-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    #custom-checkout-wrapper {
        padding: 20px 15px;
    }

    #custom-checkout-wrapper h1.custom-page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    #custom-checkout-wrapper .custom-left-col {
        padding: 20px;
    }

    #custom-checkout-wrapper .custom-cart-header {
        display: none; /* Hide header on mobile, use labels instead */
    }

    #custom-checkout-wrapper .custom-cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
        background: #fafafa;
        border-radius: 8px;
        margin-bottom: 15px;
        border: none;
    }

    #custom-checkout-wrapper .custom-product-info {
        grid-column: 1;
        gap: 15px;
    }

    #custom-checkout-wrapper .custom-product-img {
        width: 80px;
        height: 80px;
    }

    #custom-checkout-wrapper .custom-product-name {
        font-size: 14px;
    }

    #custom-checkout-wrapper .custom-price,
    #custom-checkout-wrapper .custom-subtotal {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    #custom-checkout-wrapper .custom-price:before {
        content: 'Price: ';
        font-weight: 600;
        color: #666;
    }

    #custom-checkout-wrapper .custom-subtotal:before {
        content: 'Subtotal: ';
        font-weight: 600;
        color: #666;
    }

    #custom-checkout-wrapper .custom-cart-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    #custom-checkout-wrapper .custom-coupon-input-group {
        flex-direction: column;
        width: 100%;
    }

    #custom-checkout-wrapper .custom-coupon-input-group input {
        width: 100%;
    }

    #custom-checkout-wrapper .custom-coupon-input-group button {
        width: 100%;
    }

    #custom-checkout-wrapper .custom-update-cart-link {
        text-align: center;
    }

    #custom-checkout-wrapper .custom-promo-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px 15px;
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-trust-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #custom-checkout-wrapper .custom-cart-totals {
        padding: 20px;
    }
}

/* Mobile Landscape (640px) */
@media (max-width: 640px) {
    #custom-checkout-wrapper {
        padding: 15px 10px;
    }

    #custom-checkout-wrapper h1.custom-page-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    #custom-checkout-wrapper .custom-left-col {
        padding: 15px;
    }

    #custom-checkout-wrapper .custom-product-img {
        width: 70px;
        height: 70px;
    }

    #custom-checkout-wrapper .custom-product-name {
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-remove-icon {
        font-size: 16px;
    }

    #custom-checkout-wrapper .custom-qty-selector {
        padding: 6px 12px;
        gap: 12px;
        font-size: 14px;
    }

    #custom-checkout-wrapper .custom-totals-header {
        font-size: 18px;
        margin-bottom: 20px;
    }

    #custom-checkout-wrapper .custom-final-total {
        font-size: 18px;
    }

    #custom-checkout-wrapper .custom-trust-item {
        padding: 20px 15px;
    }

    #custom-checkout-wrapper .custom-trust-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }

    #custom-checkout-wrapper .custom-trust-icon .icon-dukamarket {
        font-size: 28px;
    }

    #custom-checkout-wrapper .custom-trust-title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    #custom-checkout-wrapper .custom-trust-desc {
        font-size: 11px;
    }
}

/* Mobile Portrait (480px) */
@media (max-width: 480px) {
    #custom-checkout-wrapper {
        padding: 10px 8px;
    }

    #custom-checkout-wrapper h1.custom-page-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    #custom-checkout-wrapper .custom-left-col,
    #custom-checkout-wrapper .custom-cart-totals {
        padding: 12px;
    }

    #custom-checkout-wrapper .custom-cart-item {
        padding: 15px;
        gap: 12px;
    }

    #custom-checkout-wrapper .custom-product-info {
        gap: 12px;
    }

    #custom-checkout-wrapper .custom-remove-icon {
        font-size: 14px;
        margin-right: 5px;
    }

    #custom-checkout-wrapper .custom-product-img {
        width: 60px;
        height: 60px;
    }

    #custom-checkout-wrapper .custom-product-name {
        font-size: 12px;
    }

    #custom-checkout-wrapper .custom-price,
    #custom-checkout-wrapper .custom-subtotal {
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-qty-selector {
        padding: 5px 10px;
        gap: 10px;
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-qty-value {
        width: 25px !important;
        font-size: 13px !important;
    }

    #custom-checkout-wrapper .custom-promo-banner {
        font-size: 12px;
        padding: 10px 12px;
    }

    #custom-checkout-wrapper .custom-coupon-input-group input,
    #custom-checkout-wrapper .custom-coupon-input-group button {
        padding: 8px 12px;
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-update-cart-link {
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-totals-header {
        font-size: 16px;
        margin-bottom: 18px;
    }

    #custom-checkout-wrapper .custom-total-row {
        font-size: 14px;
        margin-bottom: 15px;
    }

    #custom-checkout-wrapper .custom-final-total {
        font-size: 16px;
        padding-top: 15px;
        margin-bottom: 15px;
    }

    #custom-checkout-wrapper .custom-checkout-btn {
        padding: 12px;
        font-size: 14px;
        border-radius: 25px;
    }

    #custom-checkout-wrapper .custom-secure-text {
        font-size: 11px;
    }

    #custom-checkout-wrapper .custom-trust-item {
        padding: 15px 12px;
    }

    #custom-checkout-wrapper .custom-trust-icon {
        font-size: 24px;
        margin-bottom: 10px;
    }

    #custom-checkout-wrapper .custom-trust-icon .icon-dukamarket {
        font-size: 24px;
    }

    #custom-checkout-wrapper .custom-trust-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    #custom-checkout-wrapper .custom-trust-desc {
        font-size: 10px;
    }
}

/* Small Mobile (375px and below) */
@media (max-width: 375px) {
    #custom-checkout-wrapper .custom-product-img {
        width: 50px;
        height: 50px;
    }

    #custom-checkout-wrapper .custom-product-name {
        font-size: 11px;
    }

    #custom-checkout-wrapper .custom-price,
    #custom-checkout-wrapper .custom-subtotal {
        font-size: 12px;
    }

    #custom-checkout-wrapper .custom-qty-selector {
        padding: 4px 8px;
        gap: 8px;
        font-size: 12px;
    }

    #custom-checkout-wrapper .custom-qty-value {
        width: 22px !important;
        font-size: 12px !important;
    }

    #custom-checkout-wrapper .custom-totals-header {
        font-size: 15px;
    }

    #custom-checkout-wrapper .custom-total-row {
        font-size: 13px;
    }

    #custom-checkout-wrapper .custom-final-total {
        font-size: 15px;
    }

    #custom-checkout-wrapper .custom-checkout-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* Landscape orientation adjustments for phones */
@media (max-height: 500px) and (orientation: landscape) {
    #custom-checkout-wrapper {
        padding: 10px;
    }

    #custom-checkout-wrapper .custom-cart-layout {
        gap: 20px;
    }

    #custom-checkout-wrapper .custom-trust-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    #custom-checkout-wrapper .custom-trust-item {
        padding: 15px 10px;
    }
}
