.frequently-bought-together {
    margin-top: 16px;
    padding: 14px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.frequently-bought-together h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #222;
    font-weight: 600;
}

.upsell-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upsell-product {
    padding: 8px 10px;
    background: #fafbfc;
    border: 1px solid #eaeaea;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s, border 0.2s;
}
.upsell-product:hover {
    box-shadow: 0 4px 16px rgba(0,123,170,0.08);
    border-color: #b3e0fc;
}

.upsell-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upsell-row-main {
    margin-bottom: 2px;
}

.upsell-checkbox {
    display: flex;
    align-items: center;
    margin-right: 0;
}
.upsell-checkbox input[type="checkbox"] {
    margin-right: 0;
    width: 16px;
    height: 16px;
    accent-color: #0073aa;
    border-radius: 4px;
    border: 1.5px solid #b3e0fc;
    transition: box-shadow 0.2s;
}
.upsell-checkbox input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px #b3e0fc;
}

.upsell-image img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fff;
}

.upsell-row-main h4 {
    font-size: 13px;
    margin: 0;
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upsell-row-main h4 a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
}
.upsell-row-main h4 a:hover {
    color: #0073aa;
}

.upsell-row-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upsell-price {
    font-size: 13px;
    color: #0073aa;
    font-weight: 600;
    white-space: nowrap;
}

.upsell-quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}
.upsell-quantity label {
    font-size: 11px;
    color: #888;
    margin-right: 2px;
}
.upsell-quantity .quantity {
    display: inline-flex;
    align-items: center;
    position: relative;
}
.upsell-quantity .quantity input[type="number"] {
    width: 44px;
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
    background: #fff;
    transition: border 0.2s;
}
.upsell-quantity .quantity input[type="number"]:focus {
    border-color: #0073aa;
}
.upsell-quantity select.upsell-quantity-select {
    padding: 3px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    width: 44px;
    background: #fff;
    transition: border 0.2s;
}
.upsell-quantity select.upsell-quantity-select:focus {
    border-color: #0073aa;
}

.upsell-variations {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.variation-option {
    display: flex;
    align-items: center;
    gap: 3px;
}
.variation-option label {
    font-size: 11px;
    color: #888;
}
.variation-option select {
    padding: 3px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    background: #fff;
    transition: border 0.2s;
}
.variation-option select:focus {
    border-color: #0073aa;
}

.upsell-add-to-cart {
    margin-top: 10px;
    padding: 10px 32px;
    background-color: #004AC7 !important;
    color: #fff !important;
    border: none;
    border-radius: 3px !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,123,170,0.08);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s, border 0.2s;
    margin-bottom: 0;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.upsell-add-to-cart.loading,
.upsell-add-to-cart:disabled {
    background: #e0e0e0 !important;
    color: #004AC7 !important;
    border: 1.5px solid #b3b3b3 !important;
    cursor: not-allowed;
    box-shadow: none;
}
.upsell-add-to-cart:hover:not(:disabled) {
    color: #004AC7 !important;
    background-color: #fff !important;
    border: 2px solid #004AC7 !important;
    box-shadow: 0 4px 16px rgba(0,123,170,0.12);
}

.upsell-add-to-cart,
.upsell-add-to-cart.button,
.frequently-bought-together .upsell-add-to-cart {
    font-size: 14px !important;
    font-family: inherit !important;
    text-transform: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .frequently-bought-together {
        padding: 8px 3px;
    }
    .frequently-bought-together h3 {
        font-size: 15px;
    }
    .upsell-products {
        gap: 4px;
    }
    .upsell-product {
        padding: 5px 6px;
    }
    .upsell-row {
        gap: 4px;
    }
    .upsell-row-main {
        margin-bottom: 1px;
    }
    .upsell-image img {
        width: 32px;
        height: 32px;
    }
    .upsell-row-main h4 {
        font-size: 12px;
    }
    .upsell-row-details {
        gap: 4px;
    }
    .upsell-price {
        font-size: 12px;
    }
    .upsell-quantity {
        min-width: 44px;
        gap: 2px;
    }
    .upsell-quantity label {
        font-size: 10px;
    }
    .upsell-quantity .quantity input[type="number"],
    .upsell-quantity select.upsell-quantity-select {
        width: 32px;
        font-size: 11px;
        padding: 2px 4px;
    }
    .variation-option label {
        font-size: 10px;
    }
    .variation-option select {
        font-size: 11px;
        padding: 2px 4px;
    }
    .upsell-add-to-cart {
        font-size: 13px;
        margin-top: 7px;
        padding: 7px 0;
    }
}
@media (max-width: 480px) {
    .frequently-bought-together {
        padding: 8px 2px;
    }
    .upsell-products {
        gap: 4px;
    }
    .upsell-product {
        padding: 10px 6px;
    }
    .upsell-row {
        gap: 6px;
    }
    .upsell-image img {
        width: 28px;
        height: 28px;
    }
    .upsell-row-main h4 {
        font-size: 13px;
    }
    .upsell-price {
        font-size: 13px;
    }
    .upsell-quantity {
        min-width: 36px;
        gap: 3px;
    }
    .upsell-quantity label {
        font-size: 12px;
    }
    .upsell-quantity .quantity input[type="number"],
    .upsell-quantity select.upsell-quantity-select {
        width: 28px;
        font-size: 12px;
        padding: 3px 4px;
    }
    .variation-option label {
        font-size: 11px;
    }
    .variation-option select {
        font-size: 12px;
        padding: 3px 4px;
    }
    .upsell-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    .upsell-add-to-cart {
        font-size: 15px !important;
        margin-top: 8px;
        padding: 13px 0;
    }
}